Class: SimpleImagesDownloader::Strategies::FromUrlStrategy

Inherits:
Strategy
  • Object
show all
Defined in:
lib/simple_images_downloader/strategies/from_url_strategy.rb

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ FromUrlStrategy

Returns a new instance of FromUrlStrategy.



6
7
8
9
# File 'lib/simple_images_downloader/strategies/from_url_strategy.rb', line 6

def initialize(url)
  super
  @url = url
end

Instance Method Details

#processObject



11
12
13
14
15
# File 'lib/simple_images_downloader/strategies/from_url_strategy.rb', line 11

def process
  uri = Line.new(@url).uri

  Downloader.new(uri).download
end