module SimpleImagesDownloader
Constants
- VERSION
Public Class Methods
from_file(path)
click to toggle source
# File lib/simple_images_downloader.rb, line 13 def self.from_file(path) source_file = SourceFile.new(path) source_file.each_line do |line| uri = Line.new(line).uri Downloader.new(uri).download rescue Errors::BaseError => e puts e.message next end end
from_url(url)
click to toggle source
# File lib/simple_images_downloader.rb, line 25 def self.from_url(url) uri = Line.new(url).uri Downloader.new(uri).download end
root()
click to toggle source
# File lib/simple_images_downloader.rb, line 30 def self.root File.dirname __dir__ end