Class: When::CalendarTypes::CalendarNote::JapaneseNote::Cal4Note

Inherits:
Object
  • Object
show all
Defined in:
lib/when_exe/region/japanese_notes.rb,
lib/when_exe/region/japanese_notes.rb

Overview

日本暦注が使用する暦法

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(calendar, solar) ⇒ 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

#calendarObject (readonly)

Returns the value of attribute calendar


393
394
395
# File 'lib/when_exe/region/japanese_notes.rb', line 393

def calendar
  @calendar
end

#solarObject (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

#doyoObject


411
412
413
# File 'lib/when_exe/region/japanese_notes.rb', line 411

def doyo
  s_calendar.doyo
end

#l_calendarObject


395
396
397
# File 'lib/when_exe/region/japanese_notes.rb', line 395

def l_calendar
  @l_calendar ||= When.Calendar(@calendar)
end

#l_phasesObject


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_calendarObject


399
400
401
# File 'lib/when_exe/region/japanese_notes.rb', line 399

def s_calendar
  @s_calendar ||= When.Calendar(@solar)
end

#s_termsObject


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