Sha256: 0ff732d49bfac2c85a356d3528cd508e4082fd60a0ba467ee39391c367f27e54
Contents?: true
Size: 510 Bytes
Versions: 2
Compression:
Stored size: 510 Bytes
Contents
module ItunesApi module Music # Wrapper for album results. class Album def initialize(data) @data = data end def self.build(albums_data) albums_data.map { |data| new(data) } end def artwork @artwork ||= data['artworkUrl100'] end def name @name ||= data['collectionName'] end def released @released ||= Date.parse(data['releaseDate']) end private attr_reader :data end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
itunes_api-0.4.2 | lib/itunes_api/music/album.rb |
itunes_api-0.4.0 | lib/itunes_api/music/album.rb |