Method: Mealy::DSL#initial_state

Defined in:
lib/mealy/dsl.rb

#initial_state(sym, &block) ⇒ Object

Declares the initial state of the FSM.

Parameters:

  • sym (Symbol)

    the initial state

  • block

    user code executed in the instance of the FSM instance on start up



13
14
15
# File 'lib/mealy/dsl.rb', line 13

def initial_state(sym, &block)
  @start_data = [sym, block]
end