1# frozen_string_literal: true 2module Gitlab 3 module PhabricatorImport 4 module Conduit 5 class TasksResponse 6 def initialize(conduit_response) 7 @conduit_response = conduit_response 8 end 9 10 delegate :pagination, to: :conduit_response 11 12 def tasks 13 @tasks ||= conduit_response.data.map do |task_json| 14 Gitlab::PhabricatorImport::Representation::Task.new(task_json) 15 end 16 end 17 18 private 19 20 attr_reader :conduit_response 21 end 22 end 23 end 24end 25