Module: AWS::Flow::DecisionStateMachineDFA::InstanceMethods Private

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_stateObject

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.



65
66
67
# File 'lib/aws/decider/state_machines.rb', line 65

def current_state
  @current_state
end

Instance Method Details

#consume(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.



67
68
69
70
71
72
73
74
75
76
# File 'lib/aws/decider/state_machines.rb', line 67

def consume(symbol)
  @state_history ||= [self.class.get_start_state]
  @state_history << @current_state
  @state_history << symbol
  transition_tuple = self.class.get_transitions[[@current_state, symbol]]
  raise "This is not a legal transition, attempting to consume #{symbol} while at state #{current_state}" unless transition_tuple
  @current_state, func_to_call = transition_tuple
  @state_history << @current_state
  func_to_call.call(self) if func_to_call
end