Class: Factor::Runtime::Workflow
- Inherits:
-
Object
- Object
- Factor::Runtime::Workflow
- Defined in:
- lib/runtime/workflow.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
Returns the value of attribute definition.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #get_activity(position) ⇒ Object
-
#initialize(definition) ⇒ Workflow
constructor
A new instance of Workflow.
Constructor Details
#initialize(definition) ⇒ Workflow
Returns a new instance of Workflow.
9 10 11 12 |
# File 'lib/runtime/workflow.rb', line 9 def initialize(definition) @definition=definition @name = @definition["name"] end |
Instance Attribute Details
#definition ⇒ Object
Returns the value of attribute definition.
6 7 8 |
# File 'lib/runtime/workflow.rb', line 6 def definition @definition end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/runtime/workflow.rb', line 7 def name @name end |
Instance Method Details
#get_activity(position) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/runtime/workflow.rb', line 14 def get_activity(position) last_position=@definition position.each do |section| return nil if last_position[section].nil? last_position=last_position[section] end last_position end |