Class: When::CalendarNote::JapaneseNote::Cal4Note
- Inherits:
-
Object
- Object
- When::CalendarNote::JapaneseNote::Cal4Note
- Defined in:
- lib/when_exe/region/japanese_notes.rb,
lib/when_exe/region/japanese_notes.rb
Overview
日本暦注が使用する暦法
Instance Attribute Summary collapse
-
#calendar ⇒ Object
readonly
Returns the value of attribute calendar.
-
#solar ⇒ Object
readonly
Returns the value of attribute solar.
Instance Method Summary collapse
- #doyo ⇒ Object
-
#initialize(calendar, solar) ⇒ Cal4Note
constructor
A new instance of Cal4Note.
- #l_calendar ⇒ Object
- #l_phases ⇒ Object
- #s_calendar ⇒ Object
- #s_terms ⇒ Object
Constructor Details
#initialize(calendar, solar) ⇒ Cal4Note
Returns a new instance of Cal4Note.
23 24 25 26 |
# File 'lib/when_exe/region/japanese_notes.rb', line 23 def initialize(calendar, solar) @calendar = calendar @solar = solar end |
Instance Attribute Details
#calendar ⇒ Object (readonly)
Returns the value of attribute calendar.
340 341 342 |
# File 'lib/when_exe/region/japanese_notes.rb', line 340 def calendar @calendar end |
#solar ⇒ Object (readonly)
Returns the value of attribute solar.
340 341 342 |
# File 'lib/when_exe/region/japanese_notes.rb', line 340 def solar @solar end |
Instance Method Details
#doyo ⇒ Object
358 359 360 |
# File 'lib/when_exe/region/japanese_notes.rb', line 358 def doyo s_calendar.doyo end |
#l_calendar ⇒ Object
342 343 344 |
# File 'lib/when_exe/region/japanese_notes.rb', line 342 def l_calendar @l_calendar ||= When.Calendar(@calendar) end |
#l_phases ⇒ Object
350 351 352 |
# File 'lib/when_exe/region/japanese_notes.rb', line 350 def l_phases @l_phases ||= JapaneseNote::LunarPhases.new('formula'=>l_calendar.formula[-1]) end |
#s_calendar ⇒ Object
346 347 348 |
# File 'lib/when_exe/region/japanese_notes.rb', line 346 def s_calendar @s_calendar ||= When.Calendar(@solar) end |
#s_terms ⇒ Object
354 355 356 |
# File 'lib/when_exe/region/japanese_notes.rb', line 354 def s_terms @s_terms ||= JapaneseNote::SolarTerms.new('formula'=>s_calendar.formula[0]) end |