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