Module: Imgfetcha

Defined in:
lib/imgfetcha.rb,
lib/imgfetcha/version.rb,
lib/imgfetcha/arg_parser.rb,
lib/imgfetcha/file_reader.rb,
lib/imgfetcha/batch_fetcher.rb,
lib/imgfetcha/errors/no_urls_found_error.rb,
lib/imgfetcha/errors/input_file_not_specified_error.rb

Defined Under Namespace

Classes: ArgParser, BatchFetcher, FileReader

Constant Summary collapse

VERSION =
'0.2.1'.freeze

Class Method Summary collapse

Class Method Details

.runObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/imgfetcha.rb', line 9

def self.run
  parser = ArgParser.new
  options = parser.run

  reader = FileReader.new(options)
  reader.run

  downloader = BatchFetcher.new(reader.result, options)
  downloader.run
rescue StandardError, NotImplementedError => e
  puts e.class, e.message
  puts e.backtrace if options[:verbose]
end