Module: AWS::Flow::Core::SimpleDFA::InstanceMethods Private

Defined in:
lib/aws/flow/simple_dfa.rb

Overview

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.

API:

  • private

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.

API:

  • private



80
81
82
# File 'lib/aws/flow/simple_dfa.rb', line 80

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.

API:

  • private



83
84
85
86
87
88
# File 'lib/aws/flow/simple_dfa.rb', line 83

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