Class: Pexels::CollectionSet

Inherits:
PaginatedResponse show all
Defined in:
lib/pexels/collection_set.rb

Instance Attribute Summary

Attributes inherited from PaginatedResponse

#page, #per_page, #total_results

Instance Method Summary collapse

Methods inherited from PaginatedResponse

#each, #next_page, #prev_page, #total_pages

Constructor Details

#initialize(response) ⇒ CollectionSet

Returns a new instance of CollectionSet.



6
7
8
9
# File 'lib/pexels/collection_set.rb', line 6

def initialize(response)
  super
  @data = attrs.fetch('collections', []).map { |attrs| Pexels::Collection.new(attrs) }
end