Class: Unavailability::UnavailableDate

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/unavailability/unavailable_date.rb

Class Method Summary collapse

Class Method Details

.from_overlapped_by(to:) ⇒ Object



20
21
22
# File 'lib/unavailability/unavailable_date.rb', line 20

def from_overlapped_by(to:)
  table[:from].lteq(to)
end

.tableObject



24
25
26
# File 'lib/unavailability/unavailable_date.rb', line 24

def table
  Unavailability::UnavailableDate.arel_table
end

.to_overlapped_by(from:) ⇒ Object



16
17
18
# File 'lib/unavailability/unavailable_date.rb', line 16

def to_overlapped_by(from:)
  table[:to].gteq(from)
end