Class: Song
- Inherits:
-
Hash
- Object
- Hash
- Song
- Defined in:
- lib/subcl/song.rb
Instance Method Summary collapse
-
#initialize(subsonic, attributes) ⇒ Song
constructor
A new instance of Song.
-
#url ⇒ Object
returns the streaming url for a song.
Constructor Details
#initialize(subsonic, attributes) ⇒ Song
Returns a new instance of Song.
2 3 4 5 6 7 8 |
# File 'lib/subcl/song.rb', line 2 def initialize(subsonic, attributes) @subsonic = subsonic self['type'] = 'song' attributes.each do |key, val| self[key] = val end end |
Instance Method Details
#url ⇒ Object
returns the streaming url for a song
11 12 13 |
# File 'lib/subcl/song.rb', line 11 def url @subsonic.song_url(self['id']) end |