Class: Repeatable::Expression::ExactDate

Inherits:
Date
  • Object
show all
Defined in:
lib/repeatable/expression/exact_date.rb

Instance Method Summary collapse

Methods inherited from Date

#==, #hash, #to_h

Methods inherited from Base

===, #difference, #intersection, #to_h, #union

Constructor Details

#initialize(date:) ⇒ ExactDate

Returns a new instance of ExactDate.



4
5
6
# File 'lib/repeatable/expression/exact_date.rb', line 4

def initialize(date:)
  @date = Date(date)
end

Instance Method Details

#include?(other_date) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/repeatable/expression/exact_date.rb', line 8

def include?(other_date)
  date == other_date
end