gitlab-org--gitlab-foss/lib/gitlab/relative_positioning/starting_from.rb

18 lines
376 B
Ruby

# frozen_string_literal: true
module Gitlab
module RelativePositioning
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
end
end