debian-mirror-gitlab/lib/gitlab/graphql/externally_paginated_array.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
331 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
module Gitlab
module Graphql
class ExternallyPaginatedArray < Array
2021-02-22 17:27:13 +05:30
attr_reader :start_cursor, :end_cursor
2020-03-13 15:44:24 +05:30
def initialize(previous_cursor, next_cursor, *args)
super(args)
2021-02-22 17:27:13 +05:30
@start_cursor = previous_cursor
@end_cursor = next_cursor
2020-03-13 15:44:24 +05:30
end
end
end
end