mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
14 lines
255 B
Ruby
14 lines
255 B
Ruby
module AASM
|
|
module SupportingClasses
|
|
class StateFactory
|
|
def self.create(name, opts={})
|
|
@states ||= {}
|
|
@states[name] ||= State.new(name, opts)
|
|
end
|
|
|
|
def self.[](name)
|
|
@states[name]
|
|
end
|
|
end
|
|
end
|
|
end
|