class Napster::Models::UploadedImage

UploadedImage model

Constants

ATTRIBUTES

Attributes

client[RW]

Public Class Methods

collection(arg) click to toggle source
# File lib/napster/models/uploaded_image.rb, line 29
def self.collection(arg)
  arg[:data].map do |uploaded_image|
    UploadedImage.new(data: uploaded_image, client: @client)
  end
end
new(arg) click to toggle source
# File lib/napster/models/uploaded_image.rb, line 20
def initialize(arg)
  @client = arg[:client] if arg[:client]
  return unless arg[:data]

  ATTRIBUTES.each do |attribute|
    send("#{attribute}=", arg[:data][attribute.to_s.camel_case_lower])
  end
end