Class: Roby::Queries::OrMatcher::Tasks
- Inherits:
-
Roby::Queries::OrMatcher
- Object
- MatcherBase
- Roby::Queries::OrMatcher
- 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 Attribute Summary
Attributes inherited from MatcherBase
Instance Method Summary collapse
-
#each_in_plan(plan, &block) ⇒ Object
Enumerate the objects matching self in the plan.
- #evaluate(plan) ⇒ Object
Methods inherited from Roby::Queries::OrMatcher
#<<, #===, #initialize, #merge
Methods included from DRoby::V5::Queries::OrMatcherDumper
Methods inherited from MatcherBase
#&, #add_neg_predicate, #add_predicate, declare_class_methods, #describe_failed_match, #each, #indexed_query?, #match, match_predicate, match_predicates, #negate, #reset, #to_a, #to_set, #|
Constructor Details
This class inherits a constructor from Roby::Queries::OrMatcher
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 |