class PixivApi::ArrayResponse
Public Class Methods
from_response(response, klass, array)
click to toggle source
# File lib/pixiv_api/array_response.rb, line 6 def self.from_response(response, klass, array) new(response).tap do |array_response| array.each do |attributes| array_response << klass.from_response(response, attributes) end end end
new(response)
click to toggle source
Calls superclass method
# File lib/pixiv_api/array_response.rb, line 14 def initialize(response) super() @response = response end
Public Instance Methods
pagination()
click to toggle source
# File lib/pixiv_api/array_response.rb, line 19 def pagination @pagination ||= Response::Pagination.new(@response, @response.parsed['pagination']) end