Methods
#
C
D
F
N
U
Attributes
[R] name
[R] options
Class Public methods
new(name, options={})
# File lib/aasm/state.rb, line 4
  def initialize(name, options={})
    @name = name
    update(options)
  end
Instance Public methods
==(state)
# File lib/aasm/state.rb, line 9
  def ==(state)
    if state.is_a? Symbol
      name == state
    else
      name == state.name
    end
  end
call_action(action, record)
# File lib/aasm/state.rb, line 17
  def call_action(action, record)
    action = @options[action]
    catch :halt_aasm_chain do
      action.is_a?(Array) ?
              action.each {|a| _call_action(a, record)} :
              _call_action(action, record)
    end
  end
display_name()
# File lib/aasm/state.rb, line 26
  def display_name
    @display_name ||= name.to_s.gsub(/_/, ' ').capitalize
  end
for_select()
# File lib/aasm/state.rb, line 30
  def for_select
    [display_name, name.to_s]
  end
update(options = {})
# File lib/aasm/state.rb, line 34
  def update(options = {})
    if options.key?(:display) then
      @display_name = options.delete(:display)
    end
    @options = options
    self
  end