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