class Napster::Models::LibraryDateTime

LibraryDateTime model Only used for /me/library/updated

Constants

ATTRIBUTES

Attributes

client[RW]

Public Class Methods

collection(arg) click to toggle source
# File lib/napster/models/library_date_time.rb, line 26
def self.collection(arg)
  arg[:data].map do |library_date_time|
    LibraryDateTime.new(data: library_date_time, client: @client)
  end
end
new(arg) click to toggle source
# File lib/napster/models/library_date_time.rb, line 18
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