Class: DailyImage::Lunar

Inherits:
Object
  • Object
show all
Defined in:
lib/daily_image/lunar_solar_converter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_leapObject

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_dayObject

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_monthObject

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_yearObject

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