class Repeatable::Expression::Difference
Attributes
excluded[R]
included[R]
Public Class Methods
new(included:, excluded:)
click to toggle source
# File lib/repeatable/expression/difference.rb, line 4 def initialize(included:, excluded:) @included = included @excluded = excluded end
Public Instance Methods
==(other)
click to toggle source
# File lib/repeatable/expression/difference.rb, line 17 def ==(other) other.is_a?(self.class) && included == other.included && excluded == other.excluded end
include?(date)
click to toggle source
# File lib/repeatable/expression/difference.rb, line 9 def include?(date) included.include?(date) && !excluded.include?(date) end
to_h()
click to toggle source
# File lib/repeatable/expression/difference.rb, line 13 def to_h Hash[hash_key, {included: included.to_h, excluded: excluded.to_h}] end