Class: Availability::Exclusion::Rule::BeforeDate
- Inherits:
-
InstanceVariableComparability
- Object
- InstanceVariableComparability
- Availability::Exclusion::Rule::BeforeDate
- Defined in:
- lib/availability/exclusion.rb
Instance Method Summary collapse
-
#initialize(date) ⇒ BeforeDate
constructor
A new instance of BeforeDate.
- #violated_by?(time) ⇒ Boolean
Methods inherited from InstanceVariableComparability
Constructor Details
#initialize(date) ⇒ BeforeDate
Returns a new instance of BeforeDate.
94 95 96 |
# File 'lib/availability/exclusion.rb', line 94 def initialize(date) @date = date end |
Instance Method Details
#violated_by?(time) ⇒ Boolean
98 99 100 |
# File 'lib/availability/exclusion.rb', line 98 def violated_by?(time) time.to_date < @date end |