Class: Hospodar::Builder::Strategies::Init

Inherits:
Object
  • Object
show all
Defined in:
lib/hospodar/builder/strategies/init.rb

Overview

Creates objects for nest and wrap strategies

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pipeObject (readonly)

Returns the value of attribute pipe.



8
9
10
# File 'lib/hospodar/builder/strategies/init.rb', line 8

def pipe
  @pipe
end

#strategyObject (readonly)

Returns the value of attribute strategy.



8
9
10
# File 'lib/hospodar/builder/strategies/init.rb', line 8

def strategy
  @strategy
end

#targetObject (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

#callObject



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