lib/zakuro/version/daien/monthly/lunar_phase.rb in zakuro-0.7.2 vs lib/zakuro/version/daien/monthly/lunar_phase.rb in zakuro-0.8.0

- old
+ new

@@ -33,11 +33,11 @@ def initialize(western_year:) # 天正閏余 lunar_age = Origin::LunarAge.get(western_year: western_year) super( - quater: QUARTER, + quarter: QUARTER, average_remainder: Origin::AverageNovember.get(western_year: western_year), solar_location: Solar::Location.new(lunar_age: lunar_age), lunar_location: Lunar::Location.new( western_year: western_year, lunar_age: Cycle::LunarRemainder.new(total: 0).add!(lunar_age) @@ -53,17 +53,17 @@ # 現在の定朔を取得する # # @return [Remainder] 定朔 # def current_remainder - # debug("@average_remainder.format: #{@average_remainder.format(form: '%d-%d-%.5f')}") + # debug("average_remainder.format: #{average_remainder.format(form: '%d-%d-%.5f')}") sum = correction_value - adjusted = @average_remainder.add( + adjusted = average_remainder.add( Cycle::Remainder.new(day: 0, minute: sum, second: 0) ) - # TODO: 大衍暦では進朔するか + # NOTE: 大衍暦では進朔しない # adjusted.up_on_new_moon! debug("result: #{adjusted.format}") adjusted @@ -73,27 +73,25 @@ # 太陽運動の補正値を得る # # @return [Integer] 太陽運動の補正値 # def correction_solar_value - @solar_location.run - # debug("@solar_term.remainder: #{@solar_location.remainder.format(form: '%d-%d-%.5f')}") - # debug("@solar_term.index: #{@solar_location.index}") + solar_location.run + # debug("solar_term.remainder: #{solar_location.remainder.format(form: '%d-%d-%.5f')}") + # debug("solar_term.index: #{solar_location.index}") - Solar::Value.get(solar_location: @solar_location) + Solar::Value.get(solar_location: solar_location) end - # :reek:TooManyStatements { max_statements: 6 } - # # 月運動の補正値を得る # # @return [Integer] 月運動の補正値 # def correction_moon_value - @lunar_location.run + lunar_location.run - remainder = @lunar_location.adjusted_remainder + remainder = lunar_location.adjusted_remainder # debug("[lunar]remainder.format: #{remainder.format(form: '%d-%d-%.5f')}") # debug("[lunar]remainder.day: #{remainder.day}") # debug("[lunar]remainder.minute: #{remainder.minute}")