2021-03-04 10:11:19 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module RelativePositioning
|
|
|
|
class ClosedRange < RelativePositioning::Range
|
|
|
|
def initialize(lhs, rhs)
|
2021-04-19 17:09:27 -04:00
|
|
|
@lhs = lhs
|
|
|
|
@rhs = rhs
|
2021-03-04 10:11:19 -05:00
|
|
|
raise IllegalRange, 'Either lhs or rhs is missing' unless lhs && rhs
|
|
|
|
raise IllegalRange, 'lhs and rhs cannot be the same object' if lhs == rhs
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|