From f64a639bcfa1fc2bc89ca7db268f594306edfd7c Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 16 Mar 2021 18:18:33 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-10-stable-ee --- lib/gitlab/relative_positioning/range.rb | 34 -------------------------------- 1 file changed, 34 deletions(-) (limited to 'lib/gitlab/relative_positioning/range.rb') diff --git a/lib/gitlab/relative_positioning/range.rb b/lib/gitlab/relative_positioning/range.rb index 0b0ccdf5be4..3214c72eb8b 100644 --- a/lib/gitlab/relative_positioning/range.rb +++ b/lib/gitlab/relative_positioning/range.rb @@ -31,39 +31,5 @@ module Gitlab other.is_a?(RelativePositioning::Range) && lhs == other.lhs && rhs == other.rhs end end - - 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 - - class StartingFrom < RelativePositioning::Range - include Gitlab::Utils::StrongMemoize - - def initialize(lhs) - @lhs = lhs - raise IllegalRange, 'lhs is required' unless lhs - end - - def rhs - strong_memoize(:rhs) { lhs.rhs_neighbour } - end - end - - class EndingAt < RelativePositioning::Range - include Gitlab::Utils::StrongMemoize - - def initialize(rhs) - @rhs = rhs - raise IllegalRange, 'rhs is required' unless rhs - end - - def lhs - strong_memoize(:lhs) { rhs.lhs_neighbour } - end - end end end -- cgit v1.2.1