support/ruby/collins-state/lib/collins/state/mixin_class_methods.rb
def action name, options = {}, &block
      name_sym = name.to_sym
      new_action = ::Collins::SimpleCallback.new(name_sym, options, block)
      @actions[name_sym] = new_action
      new_action
    end
# Register a named action for use as a transition execution target
#
# Actions are called when specified by a `:before_transition` or `:on_transition` option to an
# event. Options are not currently used.
#
# @param [Symbol] name Action name
# @param [Hash] options Action options
# @yieldparam [Collins::Asset] block Given an asset, perform the specified action
# @yieldreturn [Boolean,Object] indicates success or failure of operation. Only `false` (or an exception) indicate failure. Other return values are fine.
# @return [Collins::SimpleCallback] the callback created for the action
Register a named action for use as a transition execution target
Actions are called when specified by a `:before_transition` or `:on_transition` option to an
event. Options are not currently used.
Register a named action for use as a transition execution target Actions are called when specified by a ` : before_transition ` or ` : on_transition ` option to an event . Options are not currently used .
def action name, options = {}, &block
      name_sym = name.to_sym
      new_action = ::Collins::SimpleCallback.new(name_sym, options, block)
      @actions[name_sym] = new_action
      new_action
    end
def action name , options = { } , & block name_sym = name . to_sym new_action = :: Collins :: SimpleCallback . new ( name_sym , options , block ) @actions [ name_sym ] = new_action new_action end
Register a named action for use as a transition execution target
Actions are called when specified by a `:before_transition` or `:on_transition` option to an
event.
Register a named action for use as a transition execution target Actions are called when specified by a ` : before_transition ` or ` : on_transition ` option to an event .
indicates success or failure of operation. Only `false` (or an exception) indicate failure. Other return values are fine.
indicates success or failure of operation . Only ` false ` ( or an exception ) indicate failure . Other return values are fine .
Boolean,Object
the callback created for the action
the callback created for the action
Collins::SimpleCallback
name
options
block
block Given an asset, perform the specified action
block Given an asset perform the specified action