Class: LunarCalendar::Lunar
Overview
The Lunar Calendar Date
Instance Attribute Summary
Attributes inherited from Date
Instance Method Summary collapse
-
#initialize(year, month, day, leap = false) ⇒ Lunar
constructor
A new instance of Lunar.
-
#leap? ⇒ Boolean
Is leap month.
Methods inherited from Date
Constructor Details
#initialize(year, month, day, leap = false) ⇒ Lunar
Returns a new instance of Lunar.
14 15 16 17 |
# File 'lib/lunar_calendar/lunar.rb', line 14 def initialize(year, month, day, leap = false) super(year, month, day) @leap = leap end |
Instance Method Details
#leap? ⇒ Boolean
Returns is leap month.
22 23 24 |
# File 'lib/lunar_calendar/lunar.rb', line 22 def leap? @leap == true end |