Class: Factor::Runtime::Workflow

Inherits:
Object
  • Object
show all
Defined in:
lib/runtime/workflow.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#definitionObject

Returns the value of attribute definition.



6
7
8
# File 'lib/runtime/workflow.rb', line 6

def definition
  @definition
end

#nameObject (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