Class: Runt::Diff

Inherits:
TExpr
  • Object
show all
Defined in:
lib/runt/temporalexpression.rb

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

Methods inherited from TExpr

#&, #-, #and, #minus, #or, #|

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

Returns:

  • (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_sObject



165
# File 'lib/runt/temporalexpression.rb', line 165

def to_s; "Diff" end