Class: Zakuro::Calculation::Monthly::Meta
- Inherits:
-
Object
- Object
- Zakuro::Calculation::Monthly::Meta
- Defined in:
- lib/zakuro/calculation/monthly/internal/part/meta.rb
Overview
Meta 付加情報
Instance Attribute Summary collapse
-
#all_solar_terms ⇒ Array<Cycle::AbstractSolarTerm>
readonly
下表を例に取った場合、『日本暦日原典』の二十四節気連番のうち、2と3がその月の二十四節気となる ここで、当月のうち2より手前の日は前月の1の二十四節気に属しており、当月だけでは参照できない この参照を可能とするための情報となる.
-
#last_average_remainder ⇒ Cycle::AbstractRemainder
readonly
前月の平朔.
Instance Method Summary collapse
-
#initialize(all_solar_terms: [], last_average_remainder: Cycle::AbstractRemainder.new) ⇒ Meta
constructor
初期化.
-
#initialize_copy(obj) ⇒ Object
ディープコピー.
Constructor Details
#initialize(all_solar_terms: [], last_average_remainder: Cycle::AbstractRemainder.new) ⇒ Meta
初期化
43 44 45 46 |
# File 'lib/zakuro/calculation/monthly/internal/part/meta.rb', line 43 def initialize(all_solar_terms: [], last_average_remainder: Cycle::AbstractRemainder.new) @all_solar_terms = all_solar_terms @last_average_remainder = last_average_remainder end |
Instance Attribute Details
#all_solar_terms ⇒ Array<Cycle::AbstractSolarTerm> (readonly)
Note:
前提として、『日本暦日原典』にある月ごとの二十四節気は、その月の全ての二十四節気ではない
下表を例に取った場合、『日本暦日原典』の二十四節気連番のうち、2と3がその月の二十四節気となるここで、当月のうち2より手前の日は前月の1の二十四節気に属しており、当月だけでは参照できないこの参照を可能とするための情報となる
|No| 項目 | 前月 | 当月 | 次月 | |1 | 月 | month[index - 1] | month | month[index + 1] | |2 | 考えられる範囲 | |——————-| | |3 | 二十四節気連番 | 0 1 | 2 3 | 4 5 | |4 | 二十四節気大余 | 55 10 | 25 40 | 55 5 |
28 29 30 |
# File 'lib/zakuro/calculation/monthly/internal/part/meta.rb', line 28 def all_solar_terms @all_solar_terms end |
#last_average_remainder ⇒ Cycle::AbstractRemainder (readonly)
Note:
滅日計算に用いる
月の1日目で前月からの平朔が用いられている
Returns 前月の平朔.
35 36 37 |
# File 'lib/zakuro/calculation/monthly/internal/part/meta.rb', line 35 def last_average_remainder @last_average_remainder end |
Instance Method Details
#initialize_copy(obj) ⇒ Object
ディープコピー
53 54 55 56 |
# File 'lib/zakuro/calculation/monthly/internal/part/meta.rb', line 53 def initialize_copy(obj) @all_solar_terms = obj.all_solar_terms.clone @last_average_remainder = obj.last_average_remainder.clone end |