# frozen_string_literal: true module PKParse class Response attr_accessor :response, :pokemon def initialize(response) @response = response build_pokemon end private def build_pokemon @pokemon = response.map do |pkmn| PKParse::Pokemon.new(pkmn) end end end end