Class: Availability::Exclusion::Rule::AfterTime
- Inherits:
-
InstanceVariableComparability
- Object
- InstanceVariableComparability
- Availability::Exclusion::Rule::AfterTime
- Defined in:
- lib/availability/exclusion.rb
Instance Method Summary collapse
-
#initialize(date_or_time) ⇒ AfterTime
constructor
A new instance of AfterTime.
- #violated_by?(time) ⇒ Boolean
Methods inherited from InstanceVariableComparability
Constructor Details
#initialize(date_or_time) ⇒ AfterTime
Returns a new instance of AfterTime.
84 85 86 |
# File 'lib/availability/exclusion.rb', line 84 def initialize(date_or_time) @compare_to = date_or_time.to_time end |
Instance Method Details
#violated_by?(time) ⇒ Boolean
88 89 90 |
# File 'lib/availability/exclusion.rb', line 88 def violated_by?(time) time.to_time.seconds_since_midnight > @compare_to.to_time.seconds_since_midnight end |