Class: Acme::Smileage::Discography::LyricsDownloader

Inherits:
Utils::BaseDownloader show all
Defined in:
lib/acme/smileage/discography/lyrics_downloader.rb

Constant Summary

Constants inherited from Utils::BaseDownloader

Utils::BaseDownloader::DEFAULT_USER_AGENT

Instance Method Summary collapse

Instance Method Details

#get(lyric_links, site = nil) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/acme/smileage/discography/lyrics_downloader.rb', line 9

def get(lyric_links, site=nil)
  return nil unless lyric_links

  case site
  when :utanet
    get_utanet(lyric_links[:utanet])
  when :utamap
    get_utamap(lyric_links[:utamap])
  when nil
    get(lyric_links, :utanet) or get(lyric_links, :utamap)
  else
    raise ArgumentError, "Invalid site: #{site}"
  end
end