Class: WorkflowProcess
- Inherits:
-
Object
- Object
- WorkflowProcess
- Defined in:
- lib/datastreams/workflow_definition_ds.rb
Instance Method Summary collapse
-
#initialize(workflow, node) ⇒ WorkflowProcess
constructor
A new instance of WorkflowProcess.
- #label ⇒ Object
- #lifecycle ⇒ Object
- #name ⇒ Object
- #prerequisites ⇒ Object
- #sequence ⇒ Object
Constructor Details
#initialize(workflow, node) ⇒ WorkflowProcess
Returns a new instance of WorkflowProcess.
3 4 5 6 |
# File 'lib/datastreams/workflow_definition_ds.rb', line 3 def initialize(workflow, node) @workflow = workflow @node = node end |
Instance Method Details
#label ⇒ Object
20 21 22 |
# File 'lib/datastreams/workflow_definition_ds.rb', line 20 def label @node.at_xpath('label/text()').to_s end |
#lifecycle ⇒ Object
16 17 18 |
# File 'lib/datastreams/workflow_definition_ds.rb', line 16 def lifecycle @node['lifecycle'] end |
#name ⇒ Object
8 9 10 |
# File 'lib/datastreams/workflow_definition_ds.rb', line 8 def name @node['name'] end |
#prerequisites ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/datastreams/workflow_definition_ds.rb', line 24 def prerequisites @node.xpath('prereq').collect do |p| if (p['repository'].nil? and p['workflow'].nil?) or (p['repository'] == workflow.repository and p['workflow'] == workflow.name) p.text.to_s else [(p['repository'] or workflow.repository),(p['workflow'] or workflow.name),p.text.to_s].join(':') end end end |
#sequence ⇒ Object
12 13 14 |
# File 'lib/datastreams/workflow_definition_ds.rb', line 12 def sequence @node['sequence'] end |