Class: RussianWorkdays::Year
- Inherits:
-
CollectionPreset
- Object
- CollectionPreset
- RussianWorkdays::Year
- Defined in:
- lib/russian_workdays/year.rb
Instance Attribute Summary collapse
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(year = Date.today.year) ⇒ Year
constructor
A new instance of Year.
Constructor Details
#initialize(year = Date.today.year) ⇒ Year
Returns a new instance of Year.
10 11 12 13 14 |
# File 'lib/russian_workdays/year.rb', line 10 def initialize(year = Date.today.year) raise MissingYearError, year unless DATES.key?(year) @year = year end |
Instance Attribute Details
#year ⇒ Object (readonly)
Returns the value of attribute year.
8 9 10 |
# File 'lib/russian_workdays/year.rb', line 8 def year @year end |