Class: Zakuro::Calculation::Range::DatedOperationRange

Inherits:
AbstractOperationRange show all
Defined in:
lib/zakuro/calculation/range/dated_operation_range.rb

Overview

DatedOperationRange 運用結果範囲

Instance Attribute Summary

Attributes inherited from AbstractOperationRange

#context, #operated_solar_term, #years

Instance Method Summary collapse

Methods inherited from AbstractOperationRange

commit, #get, move, move_into_last_year, move_into_next_year, reset_meta, resolve_month, #rewrite, rewrite_month, rewrite_year

Constructor Details

#initialize(context:, start_date: Western::Calendar.new, last_date: Western::Calendar.new, years: []) ⇒ DatedOperationRange

初期化

Parameters:

  • context (Context::Context)

    暦コンテキスト

  • start_date (Western::Calendar) (defaults to: Western::Calendar.new)

    開始日

  • last_date (Western::Calendar) (defaults to: Western::Calendar.new)

    終了日

  • years (Array<Year>) (defaults to: [])

    年データ(完全範囲)



25
26
27
28
29
30
31
32
# File 'lib/zakuro/calculation/range/dated_operation_range.rb', line 25

def initialize(context:, start_date: Western::Calendar.new,
               last_date: Western::Calendar.new, years: [])
  scroll = Gengou::DatedScroll.new(
    start_date: start_date, last_date: last_date, operated: true,
    restored: false
  )
  super(context: context, scroll: scroll, years: years)
end