Class: Availability::Exclusion::Rule::OnDate

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

Instance Method Summary collapse

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

Returns:

  • (Boolean)


129
130
131
# File 'lib/availability/exclusion.rb', line 129

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