class Repeatable::Expression::Intersection
Public Class Methods
new(*elements)
click to toggle source
Calls superclass method
# File lib/repeatable/expression/intersection.rb, line 7 def initialize(*elements) elements = Array(elements).flatten other_intersections, not_intersections = elements.partition { |e| e.is_a?(self.class) } other_intersections = T.cast(other_intersections, T::Array[Expression::Intersection]) super(other_intersections.flat_map(&:elements).concat(not_intersections)) end
Public Instance Methods
include?(date)
click to toggle source
# File lib/repeatable/expression/intersection.rb, line 15 def include?(date) elements.all? { |e| e.include?(date) } end