Module: Hifsm

Defined in:
lib/hifsm.rb,
lib/hifsm/fsm.rb,
lib/hifsm/event.rb,
lib/hifsm/state.rb,
lib/hifsm/machine.rb,
lib/hifsm/version.rb,
lib/hifsm/callbacks.rb,
lib/hifsm/dsl/event_builder.rb,
lib/hifsm/dsl/state_builder.rb,
lib/hifsm/dsl/abstract_builder.rb,
lib/hifsm/adapters/active_record_adapter.rb

Defined Under Namespace

Modules: Adapters, Callbacks, DSL Classes: Event, FSM, Machine, MissingState, MissingTransition, State

Constant Summary collapse

VERSION =
"0.6.1"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



24
25
26
# File 'lib/hifsm.rb', line 24

def self.included(base)
  raise 'use extend Hifsm instead of include'
end

Instance Method Details

#hifsm(name = :state, &block) ⇒ Object



28
29
30
# File 'lib/hifsm.rb', line 28

def hifsm(name = :state, &block)
  include FSM::new(name, &block).to_module
end