Class: AmpacheSong

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ar, uid, title, artist, album, url) ⇒ AmpacheSong

Returns a new instance of AmpacheSong.



52
53
54
55
56
57
58
59
# File 'lib/lib-classes.rb', line 52

def initialize(ar, uid, title, artist, album, url)
  @ar = ar
  @uid = uid
  @title = title
  @artist = artist
  @album = album
  @url = url
end

Instance Attribute Details

#albumObject (readonly)

Returns the value of attribute album.



61
62
63
# File 'lib/lib-classes.rb', line 61

def album
  @album
end

#artistObject (readonly)

Returns the value of attribute artist.



61
62
63
# File 'lib/lib-classes.rb', line 61

def artist
  @artist
end

#titleObject (readonly)

Returns the value of attribute title.



61
62
63
# File 'lib/lib-classes.rb', line 61

def title
  @title
end

#uidObject (readonly)

Returns the value of attribute uid.



61
62
63
# File 'lib/lib-classes.rb', line 61

def uid
  @uid
end

#urlObject (readonly)

Returns the value of attribute url.



61
62
63
# File 'lib/lib-classes.rb', line 61

def url
  @url
end

Instance Method Details

#add_to_playlist(pl) ⇒ Object



63
64
65
# File 'lib/lib-classes.rb', line 63

def add_to_playlist(pl)
  pl.add(self)
end