mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
25 lines
350 B
Ruby
25 lines
350 B
Ruby
class NoInitialState
|
|
include AASM
|
|
|
|
aasm do
|
|
state :read
|
|
state :ended
|
|
|
|
event :foo do
|
|
transitions :to => :ended, :from => [:read]
|
|
end
|
|
end
|
|
end
|
|
|
|
class NoInitialStateMultiple
|
|
include AASM
|
|
|
|
aasm(:left) do
|
|
state :read
|
|
state :ended
|
|
|
|
event :foo do
|
|
transitions :to => :ended, :from => [:read]
|
|
end
|
|
end
|
|
end
|