You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,19 +92,22 @@ end
92
92
A forge builds objects using class's `.new`, passing all attributes as a single hash. Forge can be called through any of `#[]`, `#forge`, or `#build` methods (they are aliases):
Note how the forge isn't registered in the default forgeyard:
131
134
```ruby
132
-
ObjectForge[:point] # => ArgumentError: unknown forge: point
135
+
ObjectForge[:point]
136
+
# ArgumentError: unknown forge: point
133
137
```
134
138
135
139
If you find it more convenient not to use a forgeyard (for example, if you only need a single forge for your service), you can create individual forges:
@@ -142,17 +146,17 @@ forge = ObjectForge::Forge.define(Point) do |f|
0 commit comments