Class: MikadoGraph::Generator
- Inherits:
-
Object
- Object
- MikadoGraph::Generator
- Defined in:
- lib/mikado_graph/generator.rb
Instance Attribute Summary collapse
-
#graph ⇒ Object
readonly
Returns the value of attribute graph.
-
#prerequisites ⇒ Object
readonly
Returns the value of attribute prerequisites.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#graph ⇒ Object (readonly)
Returns the value of attribute graph.
5 6 7 |
# File 'lib/mikado_graph/generator.rb', line 5 def graph @graph end |
#prerequisites ⇒ Object (readonly)
Returns the value of attribute prerequisites.
5 6 7 |
# File 'lib/mikado_graph/generator.rb', line 5 def prerequisites @prerequisites end |
Class Method Details
.define(&block) ⇒ Object
7 8 9 10 11 |
# File 'lib/mikado_graph/generator.rb', line 7 def self.define(&block) generator_instance = new generator_instance.prerequisites.instance_eval(&block) generator_instance end |
Instance Method Details
#generate(options = {}) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/mikado_graph/generator.rb', line 13 def generate( = {}) add_states_to_graph(prerequisites.states) arrange_graph_direction() = () graph.output() end |