Class: Hospodar::Builder::Strategies::Execute

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

Overview

Runs building process

Direct Known Subclasses

Enumerate

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(strategy, target, factory) ⇒ Execute



10
11
12
13
14
# File 'lib/hospodar/builder/strategies/execute.rb', line 10

def initialize(strategy, target, factory)
  @strategy = strategy
  @target = target
  @factory = factory
end

Instance Attribute Details

#factoryObject (readonly)

Returns the value of attribute factory.



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

def factory
  @factory
end

#strategyObject (readonly)

Returns the value of attribute strategy.



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

def strategy
  @strategy
end

#targetObject (readonly)

Returns the value of attribute target.



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

def target
  @target
end

Instance Method Details

#call(type = nil, &block) ⇒ Object



16
17
18
19
# File 'lib/hospodar/builder/strategies/execute.rb', line 16

def call(type = nil, &block)
  run_with_error_handling { process(type, &block) }
  prepare_top
end