Class: Sheha::MonthlyEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/sheha/monthly_event.rb

Instance Attribute Summary

Attributes inherited from Event

#description, #name

Instance Method Summary collapse

Methods inherited from Event

#<=>, #==, #eql?, #hash

Constructor Details

#initialize(month_day) ⇒ MonthlyEvent

Returns a new instance of MonthlyEvent.



4
5
6
7
# File 'lib/sheha/monthly_event.rb', line 4

def initialize(month_day)
  Sheha::Helper.validate_month_day(month_day)
  super month_day
end

Instance Method Details

#event?(date) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/sheha/monthly_event.rb', line 9

def event?(date)
  month_day == date.day
end

#succObject



13
14
15
# File 'lib/sheha/monthly_event.rb', line 13

def succ
  self.class.new succ_month_day
end