Class: Roby::Queries::NotMatcher
- Inherits:
-
MatcherBase
- Object
- MatcherBase
- Roby::Queries::NotMatcher
- Includes:
- DRoby::V5::Queries::NotMatcherDumper
- Defined in:
- lib/roby/queries/not_matcher.rb,
lib/roby/droby/enable.rb
Overview
Negate a given task-matching predicate
This matcher will match if the underlying predicate does not match.
Direct Known Subclasses
Defined Under Namespace
Classes: Tasks
Instance Attribute Summary
Attributes inherited from MatcherBase
Instance Method Summary collapse
-
#===(task) ⇒ Object
True if the task matches at least one of the underlying predicates.
-
#initialize(op) ⇒ NotMatcher
constructor
Create a new TaskMatcher which matches if and only if
opdoes not.
Methods included from DRoby::V5::Queries::NotMatcherDumper
Methods inherited from MatcherBase
#&, #add_neg_predicate, #add_predicate, declare_class_methods, #describe_failed_match, #each, #each_in_plan, #indexed_query?, #match, match_predicate, match_predicates, #negate, #reset, #to_a, #to_set, #|
Constructor Details
#initialize(op) ⇒ NotMatcher
Create a new TaskMatcher which matches if and only if op does not
10 11 12 13 14 |
# File 'lib/roby/queries/not_matcher.rb', line 10 def initialize(op) super() @op = op end |
Instance Method Details
#===(task) ⇒ Object
True if the task matches at least one of the underlying predicates
17 18 19 |
# File 'lib/roby/queries/not_matcher.rb', line 17 def ===(task) !(@op === task) end |