Class: StateMachine::HelperModule
- Inherits:
-
Module
- Object
- Module
- StateMachine::HelperModule
- Defined in:
- lib/state_machine/helper_module.rb
Overview
Represents a type of module that defines instance / class methods for a state machine
Instance Method Summary collapse
-
#initialize(machine, kind) ⇒ HelperModule
constructor
:nodoc:.
-
#to_s ⇒ Object
Provides a human-readable description of the module.
Constructor Details
#initialize(machine, kind) ⇒ HelperModule
:nodoc:
5 6 7 8 |
# File 'lib/state_machine/helper_module.rb', line 5 def initialize(machine, kind) @machine = machine @kind = kind end |
Instance Method Details
#to_s ⇒ Object
Provides a human-readable description of the module
11 12 13 14 15 |
# File 'lib/state_machine/helper_module.rb', line 11 def to_s owner_class = @machine.owner_class owner_class_name = owner_class.name && !owner_class.name.empty? ? owner_class.name : owner_class.to_s "#{owner_class_name} #{@machine.name.inspect} #{@kind} helpers" end |