Class: ETFC::CLI

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

Instance Method Summary collapse

Instance Method Details

#collage(result = 'collage.jpg') ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/etfc/cli.rb', line 22

def collage(result = 'collage.jpg')
  ETFC::Runner.run(options[:keywords], result)
rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET,
       EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError,
       Net::ProtocolError, Errno::ECONNREFUSED
  puts 'There was a problem with the network connection. Please check ' \
       'your network and try again.'
  exit 1
end