summaryrefslogtreecommitdiff
path: root/lib/gitlab/phabricator_import/conduit/pagination.rb
blob: 5f54cccdbc8ef99049965a44e22b198fdda92656 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true
module Gitlab
  module PhabricatorImport
    module Conduit
      class Pagination
        def initialize(cursor_json)
          @cursor_json = cursor_json
        end

        def has_next_page?
          next_page.present?
        end

        def next_page
          cursor_json["after"]
        end

        private

        attr_reader :cursor_json
      end
    end
  end
end