Class: SimpleImagesDownloader::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_images_downloader/runner.rb

Overview

Runner class Responsible for invoking interface to download images from file

Examples:

SimpleImagesDownloader::Runner.invoke('./urls.txt')

Class Method Summary collapse

Class Method Details

.invokeObject

Allows to invoke interface to download images from file



12
13
14
15
16
# File 'lib/simple_images_downloader/runner.rb', line 12

def self.invoke
  raise SimpleImagesDownloader::Errors::MissingFileArgumentError if ARGV.size.zero?

  SimpleImagesDownloader.from_file(ARGV.first)
end