Class: Availability::Exclusion::Rule::OnDayOfWeek
- Inherits:
-
InstanceVariableComparability
- Object
- InstanceVariableComparability
- Availability::Exclusion::Rule::OnDayOfWeek
- Defined in:
- lib/availability/exclusion.rb
Instance Method Summary collapse
-
#initialize(day_of_week) ⇒ OnDayOfWeek
constructor
A new instance of OnDayOfWeek.
- #violated_by?(time) ⇒ Boolean
Methods inherited from InstanceVariableComparability
Constructor Details
#initialize(day_of_week) ⇒ OnDayOfWeek
Returns a new instance of OnDayOfWeek.
135 136 137 |
# File 'lib/availability/exclusion.rb', line 135 def initialize(day_of_week) @day_of_week = day_of_week end |
Instance Method Details
#violated_by?(time) ⇒ Boolean
139 140 141 |
# File 'lib/availability/exclusion.rb', line 139 def violated_by?(time) time.wday == @day_of_week end |