class Repeatable::Expression::Intersection
Public Class Methods
new(*elements)
click to toggle source
Calls superclass method
# File lib/repeatable/expression/intersection.rb, line 4 def initialize(*elements) other_intersection, not_intersection = elements.partition { |e| e.is_a?(self.class) } super(other_intersection.flat_map(&:elements) + not_intersection) end
Public Instance Methods
include?(date)
click to toggle source
# File lib/repeatable/expression/intersection.rb, line 9 def include?(date) elements.all? { |e| e.include?(date) } end