Class: Roby::Queries::AndMatcher::Tasks
- Defined in:
- lib/roby/queries/and_matcher.rb
Overview
Version of Roby::Queries::AndMatcher 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
36 37 38 39 40 |
# File 'lib/roby/queries/and_matcher.rb', line 36 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
30 31 32 33 |
# File 'lib/roby/queries/and_matcher.rb', line 30 def evaluate(plan) @ops.map { |o| o.evaluate(plan) } .inject(&:&) end |