Class: Sh::Lyrics
Class Method Summary collapse
Class Method Details
.get_lyrics(song) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/sh_lyrics.rb', line 3 def Lyrics.get_lyrics song artist, title = song.artist.name, song.title lyrics = nil if artist and title @lyrical_rest ||= Rest::Get.new("http://lyrical.heroku.com/api", :format => 'plain') lyrics = @lyrical_rest[:artist => artist, :song => title] lyrics = nil if lyrics.empty? end return lyrics end |