14 lines
373 B
Ruby
14 lines
373 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Gitlab
|
||
|
module RelativePositioning
|
||
|
class ClosedRange < RelativePositioning::Range
|
||
|
def initialize(lhs, rhs)
|
||
|
@lhs, @rhs = lhs, rhs
|
||
|
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
|