Class: Seatsio::Month
- Inherits:
-
Object
- Object
- Seatsio::Month
- Defined in:
- lib/seatsio/domain.rb
Instance Attribute Summary collapse
-
#month ⇒ Object
readonly
Returns the value of attribute month.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(year, month) ⇒ Month
constructor
A new instance of Month.
- #serialize ⇒ Object
Constructor Details
#initialize(year, month) ⇒ Month
Returns a new instance of Month.
587 588 589 590 |
# File 'lib/seatsio/domain.rb', line 587 def initialize(year, month) @year = year @month = month end |
Instance Attribute Details
#month ⇒ Object (readonly)
Returns the value of attribute month.
581 582 583 |
# File 'lib/seatsio/domain.rb', line 581 def month @month end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
581 582 583 |
# File 'lib/seatsio/domain.rb', line 581 def year @year end |
Class Method Details
Instance Method Details
#serialize ⇒ Object
592 593 594 |
# File 'lib/seatsio/domain.rb', line 592 def serialize @year.to_s + "-" + @month.to_s.rjust(2, "0") end |