Class: HolidaysRules::Rules::FixDate
- Defined in:
- lib/holidays_rules/rules.rb
Instance Method Summary collapse
- #holiday?(date) ⇒ Boolean
-
#initialize(year, month, day) ⇒ FixDate
constructor
A new instance of FixDate.
Methods inherited from RuleBase
Constructor Details
#initialize(year, month, day) ⇒ FixDate
Returns a new instance of FixDate.
51 52 53 54 55 |
# File 'lib/holidays_rules/rules.rb', line 51 def initialize(year, month, day) @year = year @month = month @day = day end |
Instance Method Details
#holiday?(date) ⇒ Boolean
57 58 59 |
# File 'lib/holidays_rules/rules.rb', line 57 def holiday?(date) @year == date.year && @month == date.month && @day = date.day end |