Method: StateFu::Machine#initialize

Defined in:
lib/machine.rb

#initialize(options = {}, &block) ⇒ Machine

Returns a new instance of Machine.



62
63
64
65
66
67
68
69
70
71
72
# File 'lib/machine.rb', line 62

def initialize( options={}, &block )
  @states               = [].extend( StateArray  )
  @events               = [].extend( EventArray  )
  @helpers              = [].extend( HelperArray )
  @tools                = [].extend( ToolArray   )
  @named_procs          = {}
  @requirement_messages = {}
  @options              = options
  @hooks                = Hooks.for( self )
  apply!( &block ) if block_given?
end