Class: Runt::Intersect

Inherits:
Collection show all
Defined in:
lib/runt/temporalexpression.rb

Overview

Composite TExpr that will be true only if all it’s component expressions are true.

Instance Attribute Summary

Attributes inherited from Collection

#expressions

Instance Method Summary collapse

Methods inherited from Collection

#add, #display, #initialize, #overlap?

Methods included from TExpr

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

Constructor Details

This class inherits a constructor from Runt::Collection

Instance Method Details

#include?(aDate) ⇒ Boolean

Returns:

  • (Boolean)


155
156
157
158
159
160
161
# File 'lib/runt/temporalexpression.rb', line 155

def include?(aDate)
  result = false
  @expressions.each do |expr|
    return false unless (result = expr.include?(aDate))
  end
  result
end

#to_sObject



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

def to_s 
  super {['every ', ' and ']}  
end