Class: Factrey::Blueprint::Instantiator
- Inherits:
-
Object
- Object
- Factrey::Blueprint::Instantiator
- Defined in:
- lib/factrey/blueprint/instantiator.rb
Overview
An internal class used by #instantiate.
Instance Attribute Summary collapse
- #objects ⇒ Hash{Symbol => Object} readonly
Instance Method Summary collapse
-
#initialize(context, blueprint) ⇒ Instantiator
constructor
A new instance of Instantiator.
- #instantiate_objects ⇒ Object
Constructor Details
#initialize(context, blueprint) ⇒ Instantiator
Returns a new instance of Instantiator.
14 15 16 17 18 19 |
# File 'lib/factrey/blueprint/instantiator.rb', line 14 def initialize(context, blueprint) @context = context @objects = {} @visited = Set.new @blueprint = blueprint end |
Instance Attribute Details
#objects ⇒ Hash{Symbol => Object} (readonly)
10 11 12 |
# File 'lib/factrey/blueprint/instantiator.rb', line 10 def objects @objects end |
Instance Method Details
#instantiate_objects ⇒ Object
21 22 23 24 |
# File 'lib/factrey/blueprint/instantiator.rb', line 21 def instantiate_objects @blueprint.nodes.each_value { ensure_object_instantiated(_1) } @objects end |