Class: Larrow::Runner::Manifest::FunctionStep

Inherits:
Object
  • Object
show all
Defined in:
lib/larrow/runner/manifest/configuration.rb

Overview

An abstract step which bind business logic with block This class designed for some typically service,eg:

* local file folder sync
* some service invoke

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, &block) ⇒ FunctionStep

Returns a new instance of FunctionStep.



100
101
102
103
# File 'lib/larrow/runner/manifest/configuration.rb', line 100

def initialize title, &block
  self.title = title
  self.block = block
end

Instance Attribute Details

#blockObject

Returns the value of attribute block.



99
100
101
# File 'lib/larrow/runner/manifest/configuration.rb', line 99

def block
  @block
end

#titleObject

Returns the value of attribute title.



99
100
101
# File 'lib/larrow/runner/manifest/configuration.rb', line 99

def title
  @title
end

Instance Method Details

#run_on(node, *args) ⇒ Object



105
106
107
# File 'lib/larrow/runner/manifest/configuration.rb', line 105

def run_on node, *args
  block.call node
end