Method: Trooper::Strategy#actions

Defined in:
lib/trooper/strategy.rb

#actions(*action_names) ⇒ Object

Public: Add actions to the run list.

action_names - A list of Action names.

Examples

@strategy.actions(:my_action) # => nil

Returns nil.



94
95
96
97
98
99
100
101
# File 'lib/trooper/strategy.rb', line 94

def actions(*action_names)
  [*action_names].each do |name| 
    if Arsenal.actions[name]
      # strategy_name, type, name
      @run_list << [self.name, Arsenal.actions[name].type, name]
    end
  end
end