Class: Availability::Exclusion::Rule::AfterDateAndTime

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

Instance Method Summary collapse

Methods inherited from InstanceVariableComparability

#<=>

Constructor Details

#initialize(time) ⇒ AfterDateAndTime

Returns a new instance of AfterDateAndTime.



73
74
75
76
# File 'lib/availability/exclusion.rb', line 73

def initialize(time)
  @after_date = AfterDate.new time.to_date
  @after_time = AfterTime.new time
end

Instance Method Details

#violated_by?(time) ⇒ Boolean

Returns:

  • (Boolean)


78
79
80
# File 'lib/availability/exclusion.rb', line 78

def violated_by?(time)
  @after_date.violated_by?(time) || @after_time.violated_by?(time)
end