Class: When::CalendarTypes::CalendarNote::JapaneseNote::Cal4Note
- Inherits:
-
Object
- Object
- When::CalendarTypes::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.
77 78 79 80 |
# File 'lib/when_exe/region/japanese_notes.rb', line 77 def initialize(calendar, solar) @calendar = calendar @solar = solar end |
Instance Attribute Details
#calendar ⇒ Object (readonly)
Returns the value of attribute calendar.
393 394 395 |
# File 'lib/when_exe/region/japanese_notes.rb', line 393 def calendar @calendar end |
#solar ⇒ Object (readonly)
Returns the value of attribute solar.
393 394 395 |
# File 'lib/when_exe/region/japanese_notes.rb', line 393 def solar @solar end |
Instance Method Details
#doyo ⇒ Object
411 412 413 |
# File 'lib/when_exe/region/japanese_notes.rb', line 411 def doyo s_calendar.doyo end |
#l_calendar ⇒ Object
395 396 397 |
# File 'lib/when_exe/region/japanese_notes.rb', line 395 def l_calendar @l_calendar ||= When.Calendar(@calendar) end |
#l_phases ⇒ Object
403 404 405 |
# File 'lib/when_exe/region/japanese_notes.rb', line 403 def l_phases @l_phases ||= JapaneseNote::LunarPhases.new('formula'=>l_calendar.formula[-1]) end |
#s_calendar ⇒ Object
399 400 401 |
# File 'lib/when_exe/region/japanese_notes.rb', line 399 def s_calendar @s_calendar ||= When.Calendar(@solar) end |
#s_terms ⇒ Object
407 408 409 |
# File 'lib/when_exe/region/japanese_notes.rb', line 407 def s_terms @s_terms ||= JapaneseNote::SolarTerms.new('formula'=>s_calendar.formula[0]) end |