Class: Net::DAAP::Artist
- Inherits:
-
Object
- Object
- Net::DAAP::Artist
- Defined in:
- lib/net/daap/artist.rb
Overview
This class contains artist information returned from the DAAP server.
Instance Attribute Summary collapse
-
#albums ⇒ Object
readonly
Returns the value of attribute albums.
-
#name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute name.
-
#songs ⇒ Object
readonly
Returns the value of attribute songs.
Instance Method Summary collapse
-
#initialize(args) ⇒ Artist
constructor
A new instance of Artist.
Constructor Details
#initialize(args) ⇒ Artist
Returns a new instance of Artist.
9 10 11 12 13 |
# File 'lib/net/daap/artist.rb', line 9 def initialize(args) @name = args[:name] || args['daap.songartist'] @albums = [] @songs = [] end |
Instance Attribute Details
#albums ⇒ Object (readonly)
Returns the value of attribute albums.
5 6 7 |
# File 'lib/net/daap/artist.rb', line 5 def albums @albums end |
#name ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute name.
5 6 7 |
# File 'lib/net/daap/artist.rb', line 5 def name @name end |
#songs ⇒ Object (readonly)
Returns the value of attribute songs.
5 6 7 |
# File 'lib/net/daap/artist.rb', line 5 def songs @songs end |