Class: StateMachines::HelperModule
- Inherits:
- 
      Module
      
        - Object
- Module
- StateMachines::HelperModule
 
- Defined in:
- lib/state_machines/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:
| 7 8 9 10 | # File 'lib/state_machines/helper_module.rb', line 7 def initialize(machine, kind) @machine = machine @kind = kind end | 
Instance Method Details
#to_s ⇒ Object
Provides a human-readable description of the module
| 13 14 15 16 17 | # File 'lib/state_machines/helper_module.rb', line 13 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 |