Sha256: 8f24349caf43b4caff9abc5d7c7e1f011c7f76ce917fca3ce367f014a3b73b04

Contents?: true

Size: 552 Bytes

Versions: 19

Compression:

Stored size: 552 Bytes

Contents

module StateMachine
  # Represents a type of module that defines instance / class methods for a
  # state machine
  class HelperModule < Module #:nodoc:
    def initialize(machine, kind)
      @machine = machine
      @kind = kind
    end
    
    # Provides a human-readable description of the module
    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
  end
end

Version data entries

19 entries across 19 versions & 9 rubygems

Version Path
state_machine_updated_for_ruby_3_2-2.0.0 lib/state_machine/helper_module.rb
telvue_state_machine-1.2.3 lib/state_machine/helper_module.rb
telvue_state_machine-1.2.2 lib/state_machine/helper_module.rb
state_machine_deuxito-0.0.1 lib/state_machine/helper_module.rb
telvue_state_machine-1.2.1 lib/state_machine/helper_module.rb
cm-state_machine-1.2.0.1 lib/state_machine/helper_module.rb
spree-state_machine-2.0.0.beta4 lib/state_machine/helper_module.rb
spree-state_machine-2.0.0.beta3 lib/state_machine/helper_module.rb
spree-state_machine-2.0.0.beta2 lib/state_machine/helper_module.rb
spree-state_machine-2.0.0.beta1 lib/state_machine/helper_module.rb
culturecode-state_machine-1.2.1 lib/state_machine/helper_module.rb
automat-1.2.0 lib/state_machine/helper_module.rb
glebtv_state_machine-1.3.0 lib/state_machine/helper_module.rb
state_machine-1.2.0 lib/state_machine/helper_module.rb
state_machine-1.1.2 lib/state_machine/helper_module.rb
state_machine-1.1.1 lib/state_machine/helper_module.rb
state_machine-1.1.0 lib/state_machine/helper_module.rb
state_machine-1.0.3 lib/state_machine/helper_module.rb
state_machine-1.0.2 lib/state_machine/helper_module.rb