Sha256: d020c00142cb41f314538d8725237283961bcaaf051ac08a96d7ef830da2cf5d
Contents?: true
Size: 548 Bytes
Versions: 2
Compression:
Stored size: 548 Bytes
Contents
module ItunesApi module Music # Artists or Bands resulting from a search class ArtistSearch def initialize(name) @name = name end def self.artists(name) new(name).artists end def artists @artists ||= artist_ids.map { |id| build_artist(id) } end private def artist_ids @search ||= ItunesApi.artist_ids(@name) end def build_artist(id) Artist.new( Requests::Lookup.artist_with_albums(id) ) 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/artist_search.rb |
itunes_api-0.3 | lib/itunes_api/music/artist_search.rb |