lib/time_range.rb
# Reverse of #encapsulates?, checks if the current time range is encapsulated
# by another.
#
# @param [TimeRange] time_range time range to compare against encapsulation
# @return [Boolean] whether the target range encapsulates this one
Reverse of #encapsulates?, checks if the current time range is encapsulated
by another.
Reverse of #encapsulates? checks if the current time range is encapsulated by another .
def encapsulated_by?(time_range)
    raise TypeError unless time_range.is_a?(TimeRange)
    time_range.encapsulates?(self)
  end
def encapsulated_by? ( time_range ) raise TypeError unless time_range . is_a? ( TimeRange ) time_range . encapsulates? ( self ) end
Reverse of #encapsulates?, checks if the current time range is encapsulated
by another.
Reverse of #encapsulates? checks if the current time range is encapsulated by another .
whether the target range encapsulates this one
whether the target range encapsulates this one
Boolean
time_range
time_range time range to compare against encapsulation
time_range time range to compare against encapsulation