Class: Zakuro::Calculation::Gengou::NamedScroll

Inherits:
AbstractScroll show all
Defined in:
lib/zakuro/calculation/era/gengou/named_scroll.rb

Overview

NamedScroll

元号スクロール

Instance Attribute Summary

Attributes inherited from AbstractScroll

#connector, #first_gengou, #monthly_last_date, #monthly_start_date, #range, #second_gengou

Instance Method Summary collapse

Methods inherited from AbstractScroll

#advance, #ignite, #run, #to_gengou, #western_last_year, #western_start_year

Constructor Details

#initialize(start_name: INVALID_NAME, last_name: INVALID_NAME, operated: false, restored: false) ⇒ NamedScroll

初期化

Parameters:

  • start_name (String) (defaults to: INVALID_NAME)

    開始元号名

  • last_name (String) (defaults to: INVALID_NAME)

    終了元号名

  • operated (True, False) (defaults to: false)

    運用値設定

  • restored (True, False) (defaults to: false)

    運用値から計算値に戻すか



25
26
27
28
29
30
31
32
# File 'lib/zakuro/calculation/era/gengou/named_scroll.rb', line 25

def initialize(start_name: INVALID_NAME, last_name: INVALID_NAME,
               operated: false, restored: false)
  range = Reserve::NamedRange.new(
    start_name: start_name, last_name: last_name, operated: operated,
    restored: restored
  )
  super(range: range)
end