lib/turntabler/playlist_directory.rb
def build(attrs)
      playlist = Playlist.new(client, attrs)

      # Update existing in cache or cache a new playlist
      if existing = @playlists[playlist.id]
        playlist = existing
        playlist.attributes = attrs
      else
        @playlists[playlist.id] = playlist
      end

      playlist
    end
def build(attrs)
      playlist = Playlist.new(client, attrs)

      # Update existing in cache or cache a new playlist
      if existing = @playlists[playlist.id]
        playlist = existing
        playlist.attributes = attrs
      else
        @playlists[playlist.id] = playlist
      end

      playlist
    end
def build ( attrs ) playlist = Playlist . new ( client , attrs ) # Update existing in cache or cache a new playlist if existing = @playlists [ playlist . id ] playlist = existing playlist . attributes = attrs else @playlists [ playlist . id ] = playlist end playlist end
Gets the playlist represented by the given attributes.

 If the playlist hasn't been previously accessed, then a new Playlist
 instance will get created.

 @api private
 @param [Hash] attrs The attributes representing the playlist
 @return [Turntabler::Playlist]
Gets the playlist represented by the given attributes .