Class: Roby::Queries::OrMatcher::Tasks
- Defined in:
- lib/roby/queries/or_matcher.rb
Overview
Version of Roby::Queries::OrMatcher specialized for TaskMatcher
Do not create directly, use TaskMatcher#| instead
Instance Method Summary collapse
-
#each_in_plan(plan, &block) ⇒ Object
Enumerate the objects matching self in the plan.
- #evaluate(plan) ⇒ Object
Instance Method Details
#each_in_plan(plan, &block) ⇒ Object
Enumerate the objects matching self in the plan
55 56 57 58 59 |
# File 'lib/roby/queries/or_matcher.rb', line 55 def each_in_plan(plan, &block) return enum_for(__method__, plan) unless block_given? evaluate(plan).each_in_plan(plan, &block) end |
#evaluate(plan) ⇒ Object
49 50 51 52 |
# File 'lib/roby/queries/or_matcher.rb', line 49 def evaluate(plan) @ops.map { |o| o.evaluate(plan) } .inject(&:|) end |