Sha256: edfe271ef34f2b9f292bfea8f0ad43a65f2c21d889d084eee12ba5522d88961c
Contents?: true
Size: 423 Bytes
Versions: 3
Compression:
Stored size: 423 Bytes
Contents
class Car < Vehicle state_machine do event :reverse do transition :to => :backing_up, :from => [:parked, :idling, :first_gear] end event :park do transition :to => :parked, :from => :backing_up end event :idle do transition :to => :idling, :from => :backing_up end event :shift_up do transition :to => :first_gear, :from => :backing_up end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
state_machine-0.5.0 | examples/car.rb |
state_machine-0.5.2 | examples/car.rb |
state_machine-0.5.1 | examples/car.rb |