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)


169
170
171
172
173
174
175
# File 'lib/runt/temporalexpression.rb', line 169

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

#to_sObject



177
178
179
# File 'lib/runt/temporalexpression.rb', line 177

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