Class: Runt::Diff
Overview
TExpr that will be true only if the first of it’s two contained expressions is true and the second is false.
Instance Method Summary collapse
- #include?(aDate) ⇒ Boolean
-
#initialize(expr1, expr2) ⇒ Diff
constructor
A new instance of Diff.
- #to_s ⇒ Object
Methods inherited from TExpr
Constructor Details
#initialize(expr1, expr2) ⇒ Diff
Returns a new instance of Diff.
155 156 157 158 |
# File 'lib/runt/temporalexpression.rb', line 155 def initialize(expr1, expr2) @expr1 = expr1 @expr2 = expr2 end |
Instance Method Details
#include?(aDate) ⇒ Boolean
160 161 162 163 |
# File 'lib/runt/temporalexpression.rb', line 160 def include?(aDate) return false unless (@expr1.include?(aDate) && !@expr2.include?(aDate)) true end |
#to_s ⇒ Object
165 |
# File 'lib/runt/temporalexpression.rb', line 165 def to_s; "Diff" end |