Class: Repeatable::Expression::DayInMonth

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

Instance Method Summary collapse

Methods inherited from Date

#==, #hash, #to_h

Methods inherited from Base

===, #to_h

Constructor Details

#initialize(day:) ⇒ DayInMonth

Returns a new instance of DayInMonth.



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

def initialize(day:)
  @day = day
end

Instance Method Details

#include?(date) ⇒ Boolean

Returns:

  • (Boolean)


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

def include?(date)
  date.day == day
end