Sha256: 31be91afa7c7b5b1a19d5696a3dcf76c68d7dfecbb61d47fc121a24768910094

Contents?: true

Size: 1.63 KB

Versions: 2

Compression:

Stored size: 1.63 KB

Contents

# frozen_string_literal: true

require_relative '../../../calculation/cycle/abstract_remainder'

require_relative '../const/number'

# :nodoc:
module Zakuro
  # :nodoc:
  module Senmyou
    # :nodoc:
    module Cycle
      #
      # Remainder 時刻情報(大余小余)
      #
      class Remainder < Calculation::Cycle::AbstractRemainder
        # @return [Integer] 分(1分=8秒)
        MINUTE = 8

        #
        # 初期化
        #
        # @param [Integer] day 大余("日"に相当)
        # @param [Integer] minute 小余("分"に相当)
        # @param [Integer] second 秒
        # @param [Integer] total 繰り上げなしの小余
        #
        def initialize(day: -1, minute: -1, second: -1, total: -1)
          super(base_day: Const::Number::Cycle::DAY, base_mitune: MINUTE,
                day: day, minute: minute, second: second, total: total)
        end
      end

      #
      # LunarRemainder 月の位相計算向け時刻情報(大余小余)
      #
      class LunarRemainder < Calculation::Cycle::AbstractRemainder
        # @return [Integer] 分(1分=100秒)
        MINUTE = 100

        #
        # 初期化
        #
        # @param [Integer] day 大余("日"に相当)
        # @param [Integer] minute 小余("分"に相当)
        # @param [Integer] second 秒
        # @param [Integer] total 繰り上げなしの小余
        #
        def initialize(day: -1, minute: -1, second: -1, total: -1)
          super(base_day: Const::Number::Cycle::DAY, base_mitune: MINUTE,
                day: day, minute: minute, second: second, total: total)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zakuro-0.4.0 lib/zakuro/version/senmyou/cycle/remainder.rb
zakuro-0.3.0 lib/zakuro/version/senmyou/cycle/remainder.rb