summaryrefslogtreecommitdiff
path: root/lib/gitlab/phabricator_import/conduit/users_response.rb
blob: 3dfb29a7be5a013dcadc17c27aafb394491c8132 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module Gitlab
  module PhabricatorImport
    module Conduit
      class UsersResponse
        def initialize(conduit_response)
          @conduit_response = conduit_response
        end

        def users
          @users ||= conduit_response.data.map do |user_json|
            Gitlab::PhabricatorImport::Representation::User.new(user_json)
          end
        end

        private

        attr_reader :conduit_response
      end
    end
  end
end