lib/zakuro/calculation/era/gengou/internal/reserve/abstract_range.rb in zakuro-0.9.2 vs lib/zakuro/calculation/era/gengou/internal/reserve/abstract_range.rb in zakuro-0.9.3

- old
+ new

@@ -24,15 +24,21 @@ # # 初期化 # # @param [Western::Calendar] start_date 西暦開始日 # @param [Western::Calendar] last_date 西暦終了日 + # @param [True, False] operated 運用値設定 # - def initialize(start_date: Western::Calendar.new, last_date: Western::Calendar.new) + def initialize(start_date: Western::Calendar.new, last_date: Western::Calendar.new, + operated: false) last_date = start_date.clone if last_date.invalid? - @first_list = DatedList.new(first: true, start_date: start_date, last_date: last_date) - @second_list = DatedList.new(first: false, start_date: start_date, last_date: last_date) + @first_list = DatedList.new( + first: true, start_date: start_date, last_date: last_date, operated: operated + ) + @second_list = DatedList.new( + first: false, start_date: start_date, last_date: last_date, operated: operated + ) renew(last_date: last_date) end #