Class: Flow::Base
- Inherits:
-
Object
- Object
- Flow::Base
- Defined in:
- lib/flow-lite.rb
Overview
base class for flow class (auto)-constructed/build from flowfile
Class Method Summary collapse
Class Method Details
.define_step(step) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/flow-lite.rb', line 47 def self.define_step( step ) name = step.names[0] puts "[flow] adding step >#{name}<..." define_method( name, &step.block ) alias_method( :"step_#{name}", name ) ## (auto-)add step_<name> alias alt_names = step.names[1..-1] alt_names.each do |alt_name| puts "[flow] adding alias >#{alt_name}< for >#{name}<..." alias_method( alt_name, name ) end end |