Sha256: f888bc70a53f5e3583c4b717acc494b1ce7fb8a9252e018b54252f35d8835e1c

Contents?: true

Size: 1.42 KB

Versions: 14

Compression:

Stored size: 1.42 KB

Contents

# frozen_string_literal: true

require_relative '../../../../calculation/stella/solar/abstract_location'

require_relative '../../const/remainder'

require_relative './interval'

# :nodoc:
module Zakuro
  # :nodoc:
  module Senmyou
    # :nodoc:
    module Solar
      #
      # Location 入定気
      #
      class Location < Calculation::Solar::AbstractLocation
        # @return [Cycle::Remainder] 弦
        QUARTER = Const::Remainder::Solar::QUARTER

        #
        # 初期化
        #
        # @param [Cycle::Remainder] lunar_age 天正閏余(大余小余)
        #
        def initialize(lunar_age:)
          super(lunar_age: lunar_age, quarter: QUARTER)
        end

        # :reek:UtilityFunction

        #
        # 二十四節気番号に対応する入気定日加減数を返す
        #
        # @note 継承のためクラスメソッドにしない
        #
        # @param [Integer] index 二十四節気番号
        #
        # @return [Cycle::Remainder] 入気定日加減数
        #
        def interval(index:)
          Interval.index_of(index)
        end

        # :reek:UtilityFunction

        #
        # 入気定日加減数の要素数を返す
        #
        # @note 継承のためクラスメソッドにしない
        #
        # @return [Integer] 入気定日加減数の要素数
        #
        def interval_size
          Interval.size
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
zakuro-0.9.4 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.9.3 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.9.2 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.9.1 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.9.0 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.8.0 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.7.2 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.7.0 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.6.1 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.6.0 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.5.0 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.4.0 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.3.0 lib/zakuro/version/senmyou/stella/solar/location.rb
zakuro-0.2.0 lib/zakuro/version/senmyou/stella/solar/location.rb