Module: Finite::ClassMethods
- Defined in:
- lib/finite/class_methods.rb
Overview
The class methods for any class that include the finite base
Instance Method Summary collapse
-
#finite(opts, &block) ⇒ Object
The finite method for the dsl.
Instance Method Details
#finite(opts, &block) ⇒ Object
The finite method for the dsl
8 9 10 11 |
# File 'lib/finite/class_methods.rb', line 8 def finite(opts, &block) StateMachine.machines ||= Hash.new StateMachine.machines[self] = StateMachine.new(opts[:initial], self, &block) end |