Exception: RussianWorkdays::MissingYearError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/russian_workdays/missing_year_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(year) ⇒ MissingYearError



7
8
9
10
# File 'lib/russian_workdays/missing_year_error.rb', line 7

def initialize(year)
  super
  @year = year
end

Instance Attribute Details

#yearObject (readonly)

Returns the value of attribute year.



5
6
7
# File 'lib/russian_workdays/missing_year_error.rb', line 5

def year
  @year
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/russian_workdays/missing_year_error.rb', line 12

def to_s
  "Data missing for that year: #{year}"
end