class Runt::TemporalRange
TExpr
that provides a thin wrapper around built-in Ruby Range
functionality facilitating inclusion of an arbitrary range in a temporal expression.
See also: Range
Public Instance Methods
==(o)
click to toggle source
Calls superclass method
Runt::TemporalDate#==
# File lib/runt/temporalexpression.rb, line 250 def ==(o) o.is_a?(TemporalRange) ? date_expr == o.date_expr : super(o) end
include?(date_expr)
click to toggle source
Will return true if the supplied object is included in the range used to create this instance
# File lib/runt/temporalexpression.rb, line 246 def include?(date_expr) return @date_expr.include?(date_expr) end
overlap?(date_expr)
click to toggle source
Will return true if the supplied object overlaps with the range used to create this instance
# File lib/runt/temporalexpression.rb, line 256 def overlap?(date_expr) @date_expr.each do | interval | return true if date_expr.include?(interval) end false end