Class: Zakuro::Calculation::Gengou::Reserve::NamedList
- Inherits:
-
AbstractList
- Object
- AbstractList
- Zakuro::Calculation::Gengou::Reserve::NamedList
- Defined in:
- lib/zakuro/calculation/era/gengou/internal/reserve/named_list.rb
Overview
NamedList
予約元号一覧(元号名)
Constant Summary collapse
Constants inherited from AbstractList
AbstractList::INVALID_YEAR, AbstractList::MAX_MONTH_DAYS
Instance Attribute Summary
Attributes inherited from AbstractList
#index, #last_date, #list, #operated, #restored, #start_date
Instance Method Summary collapse
-
#initialize(first: true, start_name: INVALID_NAME, last_name: INVALID_NAME, operated: false, restored: false) ⇒ NamedList
constructor
初期化.
Methods inherited from AbstractList
#change_start_date?, #collect, #get, #invalid?, #japan_start_date, #native_start_date, #western_last_date, #western_last_year, #western_start_date, #western_start_year
Constructor Details
#initialize(first: true, start_name: INVALID_NAME, last_name: INVALID_NAME, operated: false, restored: false) ⇒ NamedList
初期化
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/zakuro/calculation/era/gengou/internal/reserve/named_list.rb', line 30 def initialize(first: true, start_name: INVALID_NAME, last_name: INVALID_NAME, operated: false, restored: false) @index = parse_index(first: first) @start_date = Western::Calendar.new @last_date = Western::Calendar.new @operated = operated @restored = restored locate(start_name: start_name, last_name: last_name) super( index: index, start_date: start_date, last_date: last_date, operated: operated, restored: restored ) end |