Module: SimplerStateMachine

Defined in:
lib/simpler_state_machine/event.rb,
lib/simpler_state_machine/base.rb,
lib/simpler_state_machine/errors.rb,
lib/simpler_state_machine/version.rb,
lib/simpler_state_machine/transition.rb,
lib/simpler_state_machine/simple_state_machine.rb

Overview

SimpleStateMachine

This module should be mixed in to a class that needs a state machine implementation. refer to the readme.

Defined Under Namespace

Modules: ClassMethods, Exceptions, InstanceMethods Classes: Base, Enum, Event, Transition

Constant Summary collapse

VERSION =
"0.0.5"

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



9
10
11
12
13
14
15
16
17
18
# File 'lib/simpler_state_machine/simple_state_machine.rb', line 9

def self.included(base) #:nodoc:
  base.class_eval do
    extend ClassMethods
    include InstanceMethods

    # Alias the enum reference method for the confused end user.
    alias :enum_state :enum_status

  end
end