Method: StateMachines::State#human_name
- Defined in:
- lib/state_machines/state.rb
#human_name(klass = @machine.owner_class) ⇒ Object
Transforms the state name into a more human-readable format, such as “first gear” instead of “first_gear”
134 135 136 |
# File 'lib/state_machines/state.rb', line 134 def human_name(klass = @machine.owner_class) @human_name.is_a?(Proc) ? @human_name.call(self, klass) : @human_name end |