Class: Hospodar::Builder::Strategies::Init
- Inherits:
-
Object
- Object
- Hospodar::Builder::Strategies::Init
- Defined in:
- lib/hospodar/builder/strategies/init.rb
Overview
Creates objects for nest and wrap strategies
Instance Attribute Summary collapse
-
#pipe ⇒ Object
readonly
Returns the value of attribute pipe.
-
#strategy ⇒ Object
readonly
Returns the value of attribute strategy.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(strategy, pipe, target) ⇒ Init
constructor
A new instance of Init.
Constructor Details
#initialize(strategy, pipe, target) ⇒ Init
10 11 12 13 14 |
# File 'lib/hospodar/builder/strategies/init.rb', line 10 def initialize(strategy, pipe, target) @strategy = strategy @pipe = pipe @target = target end |
Instance Attribute Details
#pipe ⇒ Object (readonly)
Returns the value of attribute pipe.
8 9 10 |
# File 'lib/hospodar/builder/strategies/init.rb', line 8 def pipe @pipe end |
#strategy ⇒ Object (readonly)
Returns the value of attribute strategy.
8 9 10 |
# File 'lib/hospodar/builder/strategies/init.rb', line 8 def strategy @strategy end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
8 9 10 |
# File 'lib/hospodar/builder/strategies/init.rb', line 8 def target @target end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 |
# File 'lib/hospodar/builder/strategies/init.rb', line 16 def call Enumerator.new do |yielder| instantiate_objects(yielder) end.lazy end |