Class: Stealth::Flow::Specification
- Inherits:
-
Object
- Object
- Stealth::Flow::Specification
- Defined in:
- lib/stealth/flow/specification.rb
Instance Attribute Summary collapse
-
#flow_name ⇒ Object
readonly
Returns the value of attribute flow_name.
-
#initial_state ⇒ Object
Returns the value of attribute initial_state.
-
#states ⇒ Object
Returns the value of attribute states.
Instance Method Summary collapse
-
#initialize(flow_name, &specification) ⇒ Specification
constructor
A new instance of Specification.
- #state_names ⇒ Object
Constructor Details
#initialize(flow_name, &specification) ⇒ Specification
Returns a new instance of Specification.
10 11 12 13 14 |
# File 'lib/stealth/flow/specification.rb', line 10 def initialize(flow_name, &specification) @states = Hash.new @flow_name = flow_name instance_eval(&specification) end |
Instance Attribute Details
#flow_name ⇒ Object (readonly)
Returns the value of attribute flow_name.
7 8 9 |
# File 'lib/stealth/flow/specification.rb', line 7 def flow_name @flow_name end |
#initial_state ⇒ Object
Returns the value of attribute initial_state.
8 9 10 |
# File 'lib/stealth/flow/specification.rb', line 8 def initial_state @initial_state end |
#states ⇒ Object
Returns the value of attribute states.
8 9 10 |
# File 'lib/stealth/flow/specification.rb', line 8 def states @states end |
Instance Method Details
#state_names ⇒ Object
16 17 18 |
# File 'lib/stealth/flow/specification.rb', line 16 def state_names states.keys end |