Module: GoodData::Bam::Flow
- Defined in:
- lib/base/flow.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#steps ⇒ Object
Returns the value of attribute steps.
Class Method Summary collapse
- .add_step(flow, step) ⇒ Object
- .create(flow) ⇒ Object
- .define(name = "", &script) ⇒ Object
- .find_graphs(flow) ⇒ Object
- .remove_last_step(flow) ⇒ Object
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/base/flow.rb', line 9 def name @name end |
#steps ⇒ Object
Returns the value of attribute steps.
9 10 11 |
# File 'lib/base/flow.rb', line 9 def steps @steps end |
Class Method Details
.add_step(flow, step) ⇒ Object
23 24 25 26 |
# File 'lib/base/flow.rb', line 23 def self.add_step(flow, step) new_steps = flow[:steps].concat([step]) Flow.create(flow.merge({:steps => new_steps})) end |
.create(flow) ⇒ Object
5 6 7 |
# File 'lib/base/flow.rb', line 5 def self.create(flow) {:steps => []}.merge(flow).merge({:type => :flow}) end |
.define(name = "", &script) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/base/flow.rb', line 11 def self.define(name="", &script) # puts "Reading flow #{name}" x = self.new x.flow_name(name) x.instance_eval(&script) x end |
.find_graphs(flow) ⇒ Object
19 20 21 |
# File 'lib/base/flow.rb', line 19 def self.find_graphs(flow) flow[:steps].find_all {|s| s[:type] == :graph} end |