Class: Availability::Exclusion::Rule::AfterDate

Inherits:
InstanceVariableComparability show all
Defined in:
lib/availability/exclusion.rb

Instance Method Summary collapse

Methods inherited from InstanceVariableComparability

#<=>

Constructor Details

#initialize(date) ⇒ AfterDate

Returns a new instance of AfterDate.



63
64
65
# File 'lib/availability/exclusion.rb', line 63

def initialize(date)
  @date = date
end

Instance Method Details

#violated_by?(time) ⇒ Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/availability/exclusion.rb', line 67

def violated_by?(time)
  time.to_date > @date
end