Class: Stealth::Flow::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/stealth/flow/specification.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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_stateObject

Returns the value of attribute initial_state.



8
9
10
# File 'lib/stealth/flow/specification.rb', line 8

def initial_state
  @initial_state
end

#statesObject

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_namesObject



16
17
18
# File 'lib/stealth/flow/specification.rb', line 16

def state_names
  states.keys
end