Sha256: 3509c69d1161a4a93b21f1719d773bccf2ae7961ffc180917a38d0844553222c

Contents?: true

Size: 434 Bytes

Versions: 25

Compression:

Stored size: 434 Bytes

Contents

class Car < Vehicle
  state_machine :state do
    event :reverse do
      transition :to => 'backing_up', :from => %w(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

25 entries across 25 versions & 3 rubygems

Version Path
spree-enriquez-0.9.4 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.9.4 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.9.3 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.9.2 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.9.1 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.9.0 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.8.4 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.8.5 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.4.1 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.4.0 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.5.0 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.6.0 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.5.1 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.7.0 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.7.1 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.8.0 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.8.1 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.8.2 vendor/plugins/state_machine/test/app_root/app/models/car.rb
spree-0.8.3 vendor/plugins/state_machine/test/app_root/app/models/car.rb
state_machine-0.1.1 test/app_root/app/models/car.rb