Class: LyricsFinder::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/lyrics_finder/cli.rb

Instance Method Summary collapse

Instance Method Details

#searchObject



9
10
11
12
13
14
15
16
17
# File 'lib/lyrics_finder/cli.rb', line 9

def search
  begin
    puts LyricsFinder.search(options[:author], options[:title])
  rescue SocketError => ex
    puts "lyrics_finder can't connect to the internet"
  rescue OpenURI::HTTPError => ex
    puts "lyrics_finder can't find any matching lyrics for that song"
  end
end