class Zakuro::Calculation::Lunar::AbstractLocation
Attributes
calculated[R]
@return [True] 計算済み(前回計算あり) @return [False] 未計算(初回計算)
remainder[R]
@return [Cycle::LunarRemainder] 大余小余(初回:昨年天正閏余)
western_year[R]
@return [Integer] 西暦年
Public Class Methods
new(lunar_age:, western_year:)
click to toggle source
初期化
@param [Cycle::LunarRemainder] lunar_age 天正閏余(大余小余) @param [Integer] western_year
西暦年
# File lib/zakuro/calculation/stella/lunar/abstract_location.rb, line 29 def initialize(lunar_age:, western_year:) @calculated = false @western_year = western_year @remainder = lunar_age end
Public Instance Methods
add_quarter()
click to toggle source
弦の分だけ月地点を進める
# File lib/zakuro/calculation/stella/lunar/abstract_location.rb, line 45 def add_quarter # abstract end
adjusted_remainder()
click to toggle source
1始まりの大余小余を取得する
@return [Cycle::AbstractRemainder] 1始まりの大余小余
# File lib/zakuro/calculation/stella/lunar/abstract_location.rb, line 54 def adjusted_remainder @remainder.add(Cycle::AbstractRemainder.new(day: 1, minute: 0, second: 0)) end
run()
click to toggle source
入暦を計算する
# File lib/zakuro/calculation/stella/lunar/abstract_location.rb, line 38 def run # abstract end
Private Instance Methods
decrease(limit:)
click to toggle source
大余小余に合わせて減算する(折り返す)
@param [Cycle::LunarRemainder] limit 上限
# File lib/zakuro/calculation/stella/lunar/abstract_location.rb, line 72 def decrease(limit:) # abstract end
first()
click to toggle source
初回計算
# File lib/zakuro/calculation/stella/lunar/abstract_location.rb, line 63 def first # abstract end