Pages tagged state_machine:

alter ego
http://alter-ego.rubyforge.org/

Sometimes you want a single object to behave differently depending on what state it’s in. For instance, a traffic light has a different color depending on whether it is informing people that they should stop, slow down, or proceed. Or a user account object might behave differently depending on whether the account is in the “confirmed” state. AlterEgo can help you set up these state-based object “personalities”. AlterEgo will help you to define a set of valid states for your objects, and to define the allowable transitions between states. The real strength of AlterEgo, however, is in defining separate behaviors for each state that the object is in. Underneath the covers, AlterEgo will arrange for your object to delegate to a different state object depending on what state it is in. You can either explicitly define these state objects as classes, or use a concise DSL provided by AlterEgo.
A state machine plugin which allows each state to have different methods and behaviours.
AlterEgo is a Ruby implementation of the State pattern as described by the Gang of Four. It differs from other Ruby state machine libraries in that it focuses on providing polymorphic behavior based on object state.
AlterEgo is a Ruby implementation of the State pattern as described by the Gang of Four. It differs from other Ruby state machine libraries in that it focuses on providing polymorphic behavior based on object state. In effect, it makes it easy to give an object different “personalities” depending on the state it is in.
"AlterEgo is a Ruby implementation of the State pattern as described by the Gang of Four. It differs from other Ruby state machine libraries in that it focuses on providing polymorphic behavior based on object state. In effect, it makes it easy to give an object different “personalities” depending on the state it is in."
state_machine: One machine to rule them all? | PluginAWeek
http://www.pluginaweek.org/2009/03/08/state_machine-one-machine-to-rule-them-all/
After 2 1/2 years of blood, sweat, tears, and the occasional Jägermeister, I'm finally officially announcing a project I've been quietly working on:
state_machine: One machine to rule them all? | PluginAWeek
After 2 1/2 years of blood, sweat, tears, and the occasional Jägermeister, I’m finally officially announcing a project I’ve been quietly working on: state_machine.
The Rails State Machine « Envy Labs
http://blog.envylabs.com/2009/08/the-rails-state-machine/
include ActiveModel::StateMachine
Ruby on Rails recently added a built-in ActiveModel::StateMachine implementation and even more recently tied it in to ActiveRecord. And, for being a built-in library, it’s pretty damned fully-featured.
The Rails State Machine « Envy Labs
http://blog.envylabs.com/2009/08/the-rails-state-machine/
include ActiveModel::StateMachine
Ruby on Rails recently added a built-in ActiveModel::StateMachine implementation and even more recently tied it in to ActiveRecord. And, for being a built-in library, it’s pretty damned fully-featured.