Class: DataMiner::Process
- Inherits:
-
Object
- Object
- DataMiner::Process
- Defined in:
- lib/data_miner/process.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
Returns the value of attribute base.
-
#block ⇒ Object
Returns the value of attribute block.
-
#block_description ⇒ Object
Returns the value of attribute block_description.
-
#method_name ⇒ Object
Returns the value of attribute method_name.
-
#position_in_run ⇒ Object
Returns the value of attribute position_in_run.
Instance Method Summary collapse
-
#initialize(base, position_in_run, method_name_or_block_description, &block) ⇒ Process
constructor
A new instance of Process.
- #inspect ⇒ Object
- #run(run) ⇒ Object
Constructor Details
#initialize(base, position_in_run, method_name_or_block_description, &block) ⇒ Process
Returns a new instance of Process.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/data_miner/process.rb', line 8 def initialize(base, position_in_run, method_name_or_block_description, &block) @base = base @position_in_run = position_in_run if block_given? @block_description = method_name_or_block_description @block = block else @method_name = method_name_or_block_description end end |
Instance Attribute Details
#base ⇒ Object
Returns the value of attribute base.
3 4 5 |
# File 'lib/data_miner/process.rb', line 3 def base @base end |
#block ⇒ Object
Returns the value of attribute block.
5 6 7 |
# File 'lib/data_miner/process.rb', line 5 def block @block end |
#block_description ⇒ Object
Returns the value of attribute block_description.
5 6 7 |
# File 'lib/data_miner/process.rb', line 5 def block_description @block_description end |
#method_name ⇒ Object
Returns the value of attribute method_name.
4 5 6 |
# File 'lib/data_miner/process.rb', line 4 def method_name @method_name end |
#position_in_run ⇒ Object
Returns the value of attribute position_in_run.
3 4 5 |
# File 'lib/data_miner/process.rb', line 3 def position_in_run @position_in_run end |
Instance Method Details
#inspect ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/data_miner/process.rb', line 19 def inspect str = "Process(#{resource}) position #{position_in_run}" if block str << " ran block (#{block_description})" else str << " called :#{method_name}" end end |