Class: AmpacheAlbum

Inherits:
Object
  • Object
show all
Defined in:
lib/lib-classes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#artistObject (readonly)

Returns the value of attribute artist.



36
37
38
# File 'lib/lib-classes.rb', line 36

def artist
  @artist
end

#nameObject (readonly)

Returns the value of attribute name.



36
37
38
# File 'lib/lib-classes.rb', line 36

def name
  @name
end

#uidObject (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

#songsObject



38
39
40
# File 'lib/lib-classes.rb', line 38

def songs
  @songs ||= @ar.songs(self)
end