Class: DailyImage::Lunar
- Inherits:
-
Object
- Object
- DailyImage::Lunar
- Defined in:
- lib/daily_image/lunar_solar_converter.rb
Instance Attribute Summary collapse
-
#is_leap ⇒ Object
Returns the value of attribute is_leap.
-
#lunar_day ⇒ Object
Returns the value of attribute lunar_day.
-
#lunar_month ⇒ Object
Returns the value of attribute lunar_month.
-
#lunar_year ⇒ Object
Returns the value of attribute lunar_year.
Instance Method Summary collapse
-
#initialize(y = 0, m = 0, d = 0, leap = false) ⇒ Lunar
constructor
A new instance of Lunar.
Constructor Details
#initialize(y = 0, m = 0, d = 0, leap = false) ⇒ Lunar
Returns a new instance of Lunar.
7 8 9 10 11 12 |
# File 'lib/daily_image/lunar_solar_converter.rb', line 7 def initialize(y = 0, m = 0, d = 0, leap = false) @lunar_year = y @lunar_month = m @lunar_day = d @is_leap = leap end |
Instance Attribute Details
#is_leap ⇒ Object
Returns the value of attribute is_leap.
5 6 7 |
# File 'lib/daily_image/lunar_solar_converter.rb', line 5 def is_leap @is_leap end |
#lunar_day ⇒ Object
Returns the value of attribute lunar_day.
5 6 7 |
# File 'lib/daily_image/lunar_solar_converter.rb', line 5 def lunar_day @lunar_day end |
#lunar_month ⇒ Object
Returns the value of attribute lunar_month.
5 6 7 |
# File 'lib/daily_image/lunar_solar_converter.rb', line 5 def lunar_month @lunar_month end |
#lunar_year ⇒ Object
Returns the value of attribute lunar_year.
5 6 7 |
# File 'lib/daily_image/lunar_solar_converter.rb', line 5 def lunar_year @lunar_year end |