Class: AmpacheArtist
- Inherits:
-
Object
- Object
- AmpacheArtist
- Defined in:
- lib/lib-classes.rb
Instance Attribute Summary collapse
-
#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
- #albums ⇒ Object
-
#initialize(ar, uid, name) ⇒ AmpacheArtist
constructor
include play module.
Constructor Details
#initialize(ar, uid, name) ⇒ AmpacheArtist
include play module
6 7 8 9 10 |
# File 'lib/lib-classes.rb', line 6 def initialize(ar, uid, name) @ar = ar @uid = uid @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
12 13 14 |
# File 'lib/lib-classes.rb', line 12 def name @name end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
12 13 14 |
# File 'lib/lib-classes.rb', line 12 def uid @uid end |
Instance Method Details
#add_to_playlist(pl) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/lib-classes.rb', line 18 def add_to_playlist(pl) albums.each do |s| s.add_to_playlist(pl) sleep 1 end end |
#albums ⇒ Object
14 15 16 |
# File 'lib/lib-classes.rb', line 14 def albums @albums ||= @ar.albums(self) end |