Class: Roby::EventConstraints::UnboundTaskPredicate::Negate
- Inherits:
-
UnboundTaskPredicate
- Object
- UnboundTaskPredicate
- Roby::EventConstraints::UnboundTaskPredicate::Negate
- Defined in:
- lib/roby/event_constraints.rb
Overview
Representation of predicates UnboundPredicateSupport#negate and UnboundTaskPredicate#negate
See documentation from UnboundTaskPredicate
Instance Attribute Summary collapse
-
#predicate ⇒ Object
readonly
Returns the value of attribute predicate.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #code ⇒ Object
- #explain_false(task) ⇒ Object
- #explain_static(task) ⇒ Object
- #explain_true(task) ⇒ Object
-
#initialize(pred) ⇒ Negate
constructor
A new instance of Negate.
- #required_events ⇒ Object
- #static?(task) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(pred) ⇒ Negate
Returns a new instance of Negate.
454 455 456 457 |
# File 'lib/roby/event_constraints.rb', line 454 def initialize(pred) @predicate = pred super() end |
Instance Attribute Details
#predicate ⇒ Object (readonly)
Returns the value of attribute predicate.
452 453 454 |
# File 'lib/roby/event_constraints.rb', line 452 def predicate @predicate end |
Instance Method Details
#==(other) ⇒ Object
459 460 461 |
# File 'lib/roby/event_constraints.rb', line 459 def ==(other) other.kind_of?(Negate) && other.predicate == predicate end |
#code ⇒ Object
479 480 481 |
# File 'lib/roby/event_constraints.rb', line 479 def code "!(#{predicate.code})" end |
#explain_false(task) ⇒ Object
467 468 469 |
# File 'lib/roby/event_constraints.rb', line 467 def explain_false(task) predicate.explain_true(task) end |
#explain_static(task) ⇒ Object
471 472 473 |
# File 'lib/roby/event_constraints.rb', line 471 def explain_static(task) predicate.explain_static(task) end |
#explain_true(task) ⇒ Object
463 464 465 |
# File 'lib/roby/event_constraints.rb', line 463 def explain_true(task) predicate.explain_false(task) end |
#required_events ⇒ Object
475 476 477 |
# File 'lib/roby/event_constraints.rb', line 475 def required_events predicate.required_events end |
#static?(task) ⇒ Boolean
483 484 485 |
# File 'lib/roby/event_constraints.rb', line 483 def static?(task) predicate.static?(task) end |
#to_s ⇒ Object
487 488 489 |
# File 'lib/roby/event_constraints.rb', line 487 def to_s "!#{predicate}" end |