Class: GOM::Object::CachedBuilder
- Inherits:
-
Object
- Object
- GOM::Object::CachedBuilder
- Defined in:
- lib/gom/object/cached_builder.rb
Overview
Build an object out of the given draft using Builder. Uses the object-id mapping for caching the results.
Instance Attribute Summary collapse
-
#draft ⇒ Object
Returns the value of attribute draft.
-
#storage_name ⇒ Object
Returns the value of attribute storage_name.
Instance Method Summary collapse
-
#initialize(draft, storage_name) ⇒ CachedBuilder
constructor
A new instance of CachedBuilder.
- #object ⇒ Object
Constructor Details
#initialize(draft, storage_name) ⇒ CachedBuilder
Returns a new instance of CachedBuilder.
9 10 11 |
# File 'lib/gom/object/cached_builder.rb', line 9 def initialize(draft, storage_name) @draft, @storage_name = draft, storage_name end |
Instance Attribute Details
#draft ⇒ Object
Returns the value of attribute draft.
6 7 8 |
# File 'lib/gom/object/cached_builder.rb', line 6 def draft @draft end |
#storage_name ⇒ Object
Returns the value of attribute storage_name.
7 8 9 |
# File 'lib/gom/object/cached_builder.rb', line 7 def storage_name @storage_name end |
Instance Method Details
#object ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/gom/object/cached_builder.rb', line 13 def object initialize_id check_mapping build_object set_mapping @object end |