1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00
aasm/lib/state_factory.rb
2008-01-07 14:11:38 -05:00

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