Class: TExp::Not
- Inherits:
-
SingleTermBase
- Object
- Base
- SingleTermBase
- TExp::Not
- Defined in:
- lib/texp/logic.rb
Overview
Logically NEGATE a temporal expression. A date is included if it is not included in the sub-expression.
Instance Method Summary collapse
-
#encode(codes) ⇒ Object
Encode the temporal expression into
codes
. -
#includes?(date) ⇒ Boolean
Is date included in the temporal expression.
-
#inspect ⇒ Object
Human readable version of the temporal expression.
Methods inherited from SingleTermBase
Methods inherited from Base
#*, #+, #-, #-@, #each, #first_day_of_window, #include?, #last_day_of_window, parse_callback, #reanchor, register_parse_callback, #to_s, #window
Constructor Details
This class inherits a constructor from TExp::SingleTermBase
Instance Method Details
#encode(codes) ⇒ Object
Encode the temporal expression into codes
.
66 67 68 69 |
# File 'lib/texp/logic.rb', line 66 def encode(codes) @term.encode(codes) codes << encoding_token end |
#includes?(date) ⇒ Boolean
Is date included in the temporal expression.
56 57 58 |
# File 'lib/texp/logic.rb', line 56 def includes?(date) ! @term.includes?(date) end |
#inspect ⇒ Object
Human readable version of the temporal expression.
61 62 63 |
# File 'lib/texp/logic.rb', line 61 def inspect "it is not the case that " + @term.inspect end |