Method: Roby::Application#find_action_from_name
- Defined in:
- lib/roby/app.rb
#find_action_from_name(name) ⇒ (ActionInterface,Actions::Models::Action)?
Find an action with the given name on the action interfaces registered on #planners
3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 |
# File 'lib/roby/app.rb', line 3120 def find_action_from_name(name) candidates = [] planners.each do |planner_model| if (m = planner_model.find_action_by_name(name)) candidates << [planner_model, m] end end candidates = candidates.uniq return candidates.first if candidates.size <= 1 candidates_s = candidates.map { |pl, _| pl.to_s }.sort.join(", ") raise ActionResolutionError, "more than one action interface provide the #{name} "\ "action: #{candidates_s}" end |