Class: HolidayCo::Day
- Inherits:
-
Object
- Object
- HolidayCo::Day
- Defined in:
- lib/holiday_co/models/day.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
Instance Method Summary collapse
- #holiday? ⇒ Boolean
-
#initialize(date) ⇒ Day
constructor
A new instance of Day.
Constructor Details
#initialize(date) ⇒ Day
Returns a new instance of Day.
8 9 10 |
# File 'lib/holiday_co/models/day.rb', line 8 def initialize(date) @date = date.to_s end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
6 7 8 |
# File 'lib/holiday_co/models/day.rb', line 6 def date @date end |
Instance Method Details
#holiday? ⇒ Boolean
12 13 14 |
# File 'lib/holiday_co/models/day.rb', line 12 def holiday? holiday_dates.include?(date) end |