Module: AWS::Flow::DecisionStateMachineDFA Private
- Included in:
- CompleteWorkflowStateMachine, DecisionStateMachineBase
- Defined in:
- lib/aws/decider/state_machines.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Modules: InstanceMethods
Instance Attribute Summary collapse
- #start_state ⇒ Object private
- #states ⇒ Object private
- #symbols ⇒ Object private
- #transitions ⇒ Object private
Instance Method Summary collapse
- #add_transition(state, symbol, next_state, function = nil) ⇒ Object private
- #add_transitions(list_of_transitions) ⇒ Object private
- #get_start_state ⇒ Object private
- #get_transitions ⇒ Object private
- #init(start_state) ⇒ Object private
- #self_transitions(symbol) ⇒ Object private
- #uncovered_transitions ⇒ Object private
Instance Attribute Details
#start_state ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/aws/decider/state_machines.rb', line 21 def start_state @start_state end |
#states ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/aws/decider/state_machines.rb', line 21 def states @states end |
#symbols ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/aws/decider/state_machines.rb', line 21 def symbols @symbols end |
#transitions ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/aws/decider/state_machines.rb', line 21 def transitions @transitions end |
Instance Method Details
#add_transition(state, symbol, next_state, function = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
48 49 50 51 52 53 54 |
# File 'lib/aws/decider/state_machines.rb', line 48 def add_transition(state, symbol, next_state, function = nil) @symbols << symbol unless @symbols.include? symbol [state, next_state].each do |this_state| @states << this_state unless @states.include? this_state end @transitions[[state, symbol]] = [next_state, function] end |
#add_transitions(list_of_transitions) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
56 57 58 |
# File 'lib/aws/decider/state_machines.rb', line 56 def add_transitions(list_of_transitions) list_of_transitions.each {|transition| add_transition(*transition)} end |
#get_start_state ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/aws/decider/state_machines.rb', line 32 def get_start_state @start_state end |
#get_transitions ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 45 46 |
# File 'lib/aws/decider/state_machines.rb', line 42 def get_transitions # Turns out, you are your own ancestor. ancestors.slice(1..-1).map {|x| x.transitions if x.respond_to? :transitions}.compact. inject({}) {|x, y| x.merge(y)}.merge(@transitions) end |
#init(start_state) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 27 28 29 30 |
# File 'lib/aws/decider/state_machines.rb', line 23 def init(start_state) include InstanceMethods @start_state = start_state @symbols = [] @states = [] @transitions = {} @states << start_state end |
#self_transitions(symbol) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 39 40 |
# File 'lib/aws/decider/state_machines.rb', line 36 def self_transitions(symbol) states.each do |state| add_transition(state, symbol, state) unless @transitions[[state, symbol]] end end |
#uncovered_transitions ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
60 61 62 |
# File 'lib/aws/decider/state_machines.rb', line 60 def uncovered_transitions @states.product(@symbols) - @transitions.keys end |