Class: Sheha::MonthlyEvent
Instance Attribute Summary
Attributes inherited from Event
Instance Method Summary collapse
- #event?(date) ⇒ Boolean
-
#initialize(month_day) ⇒ MonthlyEvent
constructor
A new instance of MonthlyEvent.
- #succ ⇒ Object
Methods inherited from Event
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
9 10 11 |
# File 'lib/sheha/monthly_event.rb', line 9 def event?(date) month_day == date.day end |
#succ ⇒ Object
13 14 15 |
# File 'lib/sheha/monthly_event.rb', line 13 def succ self.class.new succ_month_day end |