Class: Availability::Exclusion::Rule::OnDate
- Inherits:
-
InstanceVariableComparability
- Object
- InstanceVariableComparability
- Availability::Exclusion::Rule::OnDate
- Defined in:
- lib/availability/exclusion.rb
Instance Method Summary collapse
-
#initialize(date) ⇒ OnDate
constructor
A new instance of OnDate.
- #violated_by?(time) ⇒ Boolean
Methods inherited from InstanceVariableComparability
Constructor Details
#initialize(date) ⇒ OnDate
Returns a new instance of OnDate.
125 126 127 |
# File 'lib/availability/exclusion.rb', line 125 def initialize(date) @date = date end |
Instance Method Details
#violated_by?(time) ⇒ Boolean
129 130 131 |
# File 'lib/availability/exclusion.rb', line 129 def violated_by?(time) time.to_date == @date end |