debian-mirror-gitlab/lib/gitlab/relative_positioning/starting_from.rb
2021-04-17 20:07:23 +05:30

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