Class: When::CalendarNote::Japanese::Cal4Note
- Inherits:
-
Object
- Object
- When::CalendarNote::Japanese::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.
359 360 361 |
# File 'lib/when_exe/region/japanese/notes.rb', line 359 def calendar @calendar end |
#solar ⇒ Object (readonly)
Returns the value of attribute solar.
359 360 361 |
# File 'lib/when_exe/region/japanese/notes.rb', line 359 def solar @solar end |
Instance Method Details
#doyo ⇒ Object
377 378 379 |
# File 'lib/when_exe/region/japanese/notes.rb', line 377 def doyo s_calendar.doyo end |
#l_calendar ⇒ Object
361 362 363 |
# File 'lib/when_exe/region/japanese/notes.rb', line 361 def l_calendar @l_calendar ||= When.Calendar(@calendar) end |
#l_phases ⇒ Object
369 370 371 |
# File 'lib/when_exe/region/japanese/notes.rb', line 369 def l_phases @l_phases ||= Japanese::LunarPhases.new('formula'=>l_calendar.formula[-1]) end |
#s_calendar ⇒ Object
365 366 367 |
# File 'lib/when_exe/region/japanese/notes.rb', line 365 def s_calendar @s_calendar ||= When.Calendar(@solar) end |
#s_terms ⇒ Object
373 374 375 |
# File 'lib/when_exe/region/japanese/notes.rb', line 373 def s_terms @s_terms ||= Japanese::SolarTerms.new('formula'=>s_calendar.formula[0]) end |