class Pexels::PhotoSet
Public Class Methods
new(response)
click to toggle source
Calls superclass method
Pexels::PaginatedResponse::new
# File lib/pexels/photo_set.rb, line 6 def initialize(response) super @data = attrs.fetch('photos', []).map { |attrs| Pexels::Photo.new(attrs) } rescue KeyError => exception raise Pexels::MalformedAPIResponseError.new(exception) end