class Pexels::VideoSet

Public Class Methods

new(response) click to toggle source
Calls superclass method Pexels::PaginatedResponse::new
# File lib/pexels/video_set.rb, line 6
def initialize(response)
  super
  @data = attrs.fetch('videos', []).map { |attrs| Pexels::Video.new(attrs) }

rescue KeyError => exception
  raise Pexels::MalformedAPIResponseError.new(exception)
end