Sha256: c7c662b81d22d0cefb705c11f7169d996e52e23a604ccf103230f2cfa35d367c
Contents?: true
Size: 572 Bytes
Versions: 5
Compression:
Stored size: 572 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 attr_reader :name 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
5 entries across 5 versions & 1 rubygems