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

Methods inherited from Base

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

Constructor Details

#initialize(date:) ⇒ void

Parameters:

  • date (Object)


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

def initialize(date:)
  @date = T.let(Conversions::Date(date), ::Date)
end

Instance Method Details

#include?(other_date) ⇒ Boolean

Parameters:

  • other_date (::Date)

Returns:

  • (Boolean)


12
13
14
# File 'lib/repeatable/expression/exact_date.rb', line 12

def include?(other_date)
  date == other_date
end