Class: Net::DAAP::Artist

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/net/daap/artist.rb

Overview

This class contains artist information returned from the DAAP server.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Artist

Returns a new instance of Artist.



10
11
12
13
14
# File 'lib/net/daap/artist.rb', line 10

def initialize(args)
  @name   = args[:name] || args['daap.songartist']
  @albums = []
  @songs  = []
end

Instance Attribute Details

#albumsObject (readonly)

Returns the value of attribute albums.



6
7
8
# File 'lib/net/daap/artist.rb', line 6

def albums
  @albums
end

#nameObject (readonly) Also known as: to_s

Returns the value of attribute name.



6
7
8
# File 'lib/net/daap/artist.rb', line 6

def name
  @name
end

#songsObject (readonly)

Returns the value of attribute songs.



6
7
8
# File 'lib/net/daap/artist.rb', line 6

def songs
  @songs
end

Instance Method Details

#<=>(other) ⇒ Object



16
17
18
# File 'lib/net/daap/artist.rb', line 16

def <=>(other)
  name <=> other.name
end