Class: January
- Inherits:
-
Month
- Object
- Month
- January
- Defined in:
- lib/january.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.of(year) ⇒ Object
3 4 5 |
# File 'lib/january.rb', line 3 def self.of(year) January.for("1.1.#{year}") end |
Instance Method Details
#month ⇒ Object
15 16 17 |
# File 'lib/january.rb', line 15 def month 1 end |
#next ⇒ Object
7 8 9 |
# File 'lib/january.rb', line 7 def next January.for("1.1.#{year.to_i + 1}") end |
#previous ⇒ Object
11 12 13 |
# File 'lib/january.rb', line 11 def previous January.for("1.1.#{year.to_i - 1}") end |
#year ⇒ Object
19 20 21 |
# File 'lib/january.rb', line 19 def year start_date.year end |