Class: Net::DAAP::Album
- Inherits:
-
Object
- Object
- Net::DAAP::Album
- Includes:
- Comparable
- Defined in:
- lib/net/daap/album.rb
Overview
This class contains album information returned from the DAAP server.
Instance Attribute Summary collapse
-
#artist ⇒ Object
readonly
Returns the value of attribute artist.
-
#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
- #<=>(other) ⇒ Object
-
#initialize(args) ⇒ Album
constructor
A new instance of Album.
Constructor Details
#initialize(args) ⇒ Album
Returns a new instance of Album.
10 11 12 13 14 |
# File 'lib/net/daap/album.rb', line 10 def initialize(args) @name = args[:name] || args['daap.songalbum'] @artist = args[:artist] @songs = [] end |
Instance Attribute Details
#artist ⇒ Object (readonly)
Returns the value of attribute artist.
6 7 8 |
# File 'lib/net/daap/album.rb', line 6 def artist @artist end |
#name ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute name.
6 7 8 |
# File 'lib/net/daap/album.rb', line 6 def name @name end |
#songs ⇒ Object (readonly)
Returns the value of attribute songs.
6 7 8 |
# File 'lib/net/daap/album.rb', line 6 def songs @songs end |
Instance Method Details
#<=>(other) ⇒ Object
16 17 18 |
# File 'lib/net/daap/album.rb', line 16 def <=>(other) name <=> other.name end |