Skip to content

Adds support for creating state machines for attributes on any Ruby class

License

Notifications You must be signed in to change notification settings

RohitRox/state_machine

 
 

Repository files navigation

state_machine forked from pluginaweek/state_machine

Changelog:

A hash with {name: :state_name, value: state_value} can be passed in initial.

Why?

In previous implementation

  class Bike

    PARKED  = 0

    state_machine attribute: :status, :initial => :parked do
      state :parked, value: Bike::PARKED
    end

  end

would initialize with status "parked"

About

Adds support for creating state machines for attributes on any Ruby class

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 97.3%
  • CSS 1.8%
  • JavaScript 0.9%