Class: Feriados::Rules::FixDate
- Defined in:
- lib/feriados/rules/fix_date.rb
Instance Attribute Summary
Attributes inherited from RuleBase
Instance Method Summary collapse
- #holiday?(date) ⇒ Boolean
-
#initialize(year, month, day, name = nil) ⇒ FixDate
constructor
A new instance of FixDate.
Methods inherited from RuleBase
Constructor Details
#initialize(year, month, day, name = nil) ⇒ FixDate
Returns a new instance of FixDate.
4 5 6 7 8 9 |
# File 'lib/feriados/rules/fix_date.rb', line 4 def initialize(year, month, day, name = nil) super(name) @year = year @month = month @day = day end |
Instance Method Details
#holiday?(date) ⇒ Boolean
11 12 13 |
# File 'lib/feriados/rules/fix_date.rb', line 11 def holiday?(date) year == date.year && month == date.month && day == date.day end |