class TimeFrame::Empty

Singleton class for the empty time frame object

Public Instance Methods

&(_other) click to toggle source
# File lib/time_frame/empty.rb, line 22
def &(_other)
  self
end
cover?(element) click to toggle source
# File lib/time_frame/empty.rb, line 10
def cover?(element)
  element == EMPTY
end
duration() click to toggle source
# File lib/time_frame/empty.rb, line 6
def duration
  0
end
empty?() click to toggle source
# File lib/time_frame/empty.rb, line 14
def empty?
  true
end
inspect() click to toggle source
# File lib/time_frame/empty.rb, line 46
def inspect
  'EMPTY'
end
overlaps?(_) click to toggle source
# File lib/time_frame/empty.rb, line 26
def overlaps?(_)
  false
end
shift_by(_) click to toggle source
# File lib/time_frame/empty.rb, line 34
def shift_by(_)
  fail TypeError, 'can\'t shift empty time frame'
end
shift_to(_) click to toggle source
# File lib/time_frame/empty.rb, line 38
def shift_to(_)
  fail TypeError, 'can\'t shift empty time frame'
end
split_by_interval(_) click to toggle source
# File lib/time_frame/empty.rb, line 30
def split_by_interval(_)
  []
end
time_between(_) click to toggle source
# File lib/time_frame/empty.rb, line 18
def time_between(_)
  fail TypeError, 'time_between is undefined for empty time frame'
end
without(*_) click to toggle source
# File lib/time_frame/empty.rb, line 42
def without(*_)
  []
end