Module: RailsStateMachine::Model

Defined in:
lib/rails_state_machine/model.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/rails_state_machine/model.rb', line 5

def self.included(base)
  base.class_eval do
    extend ClassMethods

    cattr_accessor :state_machines
    self.state_machines ||= {}

    delegate :state_machine, to: :class
  end
end