File: auto_shop.rb

package info (click to toggle)
ruby-state-machine 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,764 kB
  • ctags: 6,623
  • sloc: ruby: 26,008; makefile: 11
file content (13 lines) | stat: -rw-r--r-- 240 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'state_machine'

class AutoShop
  state_machine :initial => :available do
    event :tow_vehicle do
      transition :available => :busy
    end
    
    event :fix_vehicle do
      transition :busy => :available 
    end
  end
end