def define_name_helpers
      # Gets the humanized version of a state
      define_helper(:class, "human_#{attribute(:name)}") do |machine, klass, state|
        machine.states.fetch(state).human_name(klass)
      end

      # Gets the humanized version of an event
      define_helper(:class, "human_#{attribute(:event_name)}") do |machine, klass, event|
        machine.events.fetch(event).human_name(klass)
      end

      # Gets the state name for the current value
      define_helper(:instance, attribute(:name)) do |machine, object|
        machine.states.match!(object).name
      end

      # Gets the human state name for the current value
      define_helper(:instance, "human_#{attribute(:name)}") do |machine, object|
        machine.states.match!(object).human_name(object.class)
      end
    end
def define_name_helpers
      # Gets the humanized version of a state
      define_helper(:class, "human_#{attribute(:name)}") do |machine, klass, state|
        machine.states.fetch(state).human_name(klass)
      end

      # Gets the humanized version of an event
      define_helper(:class, "human_#{attribute(:event_name)}") do |machine, klass, event|
        machine.events.fetch(event).human_name(klass)
      end

      # Gets the state name for the current value
      define_helper(:instance, attribute(:name)) do |machine, object|
        machine.states.match!(object).name
      end

      # Gets the human state name for the current value
      define_helper(:instance, "human_#{attribute(:name)}") do |machine, object|
        machine.states.match!(object).human_name(object.class)
      end
    end
Adds helper methods for accessing naming information about states and
 events on the owner class