Module: Statum

Defined in:
lib/statum.rb,
lib/statum/hook.rb,
lib/statum/event.rb,
lib/statum/machine.rb,
lib/statum/version.rb,
lib/statum/class_methods.rb,
lib/statum/state_definer.rb,
lib/statum/instance_methods.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: Event, Hook, Machine, StateDefiner

Constant Summary collapse

UnknownEventError =

Error for unknown event

Class.new(ArgumentError)
ErrorTransitionError =

Error for wrong transition

Class.new(StandardError)
ExistingMachineError =

Error for duplicated state machine

Class.new(ArgumentError)
STATE_MACHINES_VARIABLE =

Variable to store state machines

'@__statum_machines'.freeze
ANY_STATE_NAME =

Any state identifier

:__statum_any_state
VERSION =
"0.3.1".freeze

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


26
27
28
29
# File 'lib/statum.rb', line 26

def included(base)
  base.extend(Statum::ClassMethods)
  base.include(Statum::InstanceMethods)
end