Class: AmpacheAlbum
- Inherits:
-
Object
- Object
- AmpacheAlbum
- Defined in:
- lib/lib-classes.rb
Instance Attribute Summary collapse
-
#artist ⇒ Object
readonly
Returns the value of attribute artist.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
Instance Method Summary collapse
- #add_to_playlist(pl) ⇒ Object
-
#initialize(ar, uid, name, artist) ⇒ AmpacheAlbum
constructor
A new instance of AmpacheAlbum.
- #songs ⇒ Object
Constructor Details
#initialize(ar, uid, name, artist) ⇒ AmpacheAlbum
Returns a new instance of AmpacheAlbum.
29 30 31 32 33 34 |
# File 'lib/lib-classes.rb', line 29 def initialize(ar, uid, name, artist) @ar = ar @uid = uid @name = name @artist = artist end |
Instance Attribute Details
#artist ⇒ Object (readonly)
Returns the value of attribute artist.
36 37 38 |
# File 'lib/lib-classes.rb', line 36 def artist @artist end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
36 37 38 |
# File 'lib/lib-classes.rb', line 36 def name @name end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
36 37 38 |
# File 'lib/lib-classes.rb', line 36 def uid @uid end |
Instance Method Details
#add_to_playlist(pl) ⇒ Object
42 43 44 45 46 |
# File 'lib/lib-classes.rb', line 42 def add_to_playlist(pl) songs.each do |s| s.add_to_playlist(pl) end end |
#songs ⇒ Object
38 39 40 |
# File 'lib/lib-classes.rb', line 38 def songs @songs ||= @ar.songs(self) end |