Class: Itiel::Script::RubyScript
- Inherits:
-
Object
- Object
- Itiel::Script::RubyScript
- Includes:
- ChainedStep
- Defined in:
- lib/itiel/script/ruby_script.rb
Overview
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
Attributes included from ChainedStep
Instance Method Summary collapse
- #execute(input_stream) ⇒ Object
-
#initialize(&block) ⇒ RubyScript
constructor
A new instance of RubyScript.
Methods included from ChainedStep
Constructor Details
#initialize(&block) ⇒ RubyScript
Returns a new instance of RubyScript.
19 20 21 |
# File 'lib/itiel/script/ruby_script.rb', line 19 def initialize(&block) self.block = block end |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
17 18 19 |
# File 'lib/itiel/script/ruby_script.rb', line 17 def block @block end |
Instance Method Details
#execute(input_stream) ⇒ Object
23 24 25 26 27 |
# File 'lib/itiel/script/ruby_script.rb', line 23 def execute(input_stream) input_stream.each do |row| block.call(row) end end |