Module: AWS::Flow::Core::SimpleDFA::InstanceMethods
- Defined in:
- lib/aws/flow/simple_dfa.rb
Instance Attribute Summary collapse
-
#current_state ⇒ Object
Returns the value of attribute current_state.
Instance Method Summary collapse
Instance Attribute Details
#current_state ⇒ Object
Returns the value of attribute current_state.
72 73 74 |
# File 'lib/aws/flow/simple_dfa.rb', line 72 def current_state @current_state end |
Instance Method Details
#consume(symbol) ⇒ Object
74 75 76 77 78 79 |
# File 'lib/aws/flow/simple_dfa.rb', line 74 def consume(symbol) @current_state ||= self.class.get_start_state func_to_call = self.class.get_transitions[[@current_state, symbol]] raise "This is not a legal transition" unless func_to_call func_to_call.call(self) end |