Class: GOM::Object::Builder
- Inherits:
-
Object
- Object
- GOM::Object::Builder
- Defined in:
- lib/gom/object/builder.rb
Overview
Build an object out of the given draft.
Instance Attribute Summary collapse
-
#draft ⇒ Object
Returns the value of attribute draft.
- #object ⇒ Object
Instance Method Summary collapse
-
#initialize(draft, object = nil) ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize(draft, object = nil) ⇒ Builder
Returns a new instance of Builder.
8 9 10 |
# File 'lib/gom/object/builder.rb', line 8 def initialize(draft, object = nil) @draft, @object = draft, object end |
Instance Attribute Details
#draft ⇒ Object
Returns the value of attribute draft.
5 6 7 |
# File 'lib/gom/object/builder.rb', line 5 def draft @draft end |
#object ⇒ Object
12 13 14 15 16 17 |
# File 'lib/gom/object/builder.rb', line 12 def object initialize_object unless @object set_properties set_relations @object end |