Class: Feriados::Rules::HolyFriday

Inherits:
Function
  • Object
show all
Defined in:
lib/feriados/rules/holy_friday.rb

Class Method Summary collapse

Class Method Details

.holiday?(date) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/feriados/rules/holy_friday.rb', line 4

def self.holiday?(date)
  Easter.new(date.year).date - 2 == date
end