Module: FiniteMachine::ClassMethods
- Included in:
- FiniteMachine
- Defined in:
- lib/finite_machine.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#define(&block) ⇒ Class
A factory method for creating reusable FiniteMachine definitions.
-
#new(*args, &block) ⇒ FiniteMachine::StateMachine
Initialize an instance of finite machine.
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
51 52 53 |
# File 'lib/finite_machine.rb', line 51 def logger @logger end |
Instance Method Details
#define(&block) ⇒ Class
A factory method for creating reusable FiniteMachine definitions
77 78 79 |
# File 'lib/finite_machine.rb', line 77 def define(&block) Class.new(Definition, &block) end |
#new(*args, &block) ⇒ FiniteMachine::StateMachine
Initialize an instance of finite machine
63 64 65 |
# File 'lib/finite_machine.rb', line 63 def new(*args, &block) StateMachine.new(*args, &block) end |