mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
21 lines
324 B
Ruby
21 lines
324 B
Ruby
module Models
|
|
class Process
|
|
include AASM
|
|
|
|
aasm do
|
|
state :sleeping
|
|
state :running
|
|
state :suspended
|
|
|
|
event :start do
|
|
transitions :from => :sleeping, :to => :running
|
|
end
|
|
|
|
event :stop do
|
|
transitions :from => :running, :to => :suspended
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
|