Class: Aranha::Fixtures::Download
- Inherits:
-
Object
- Object
- Aranha::Fixtures::Download
- Defined in:
- lib/aranha/fixtures/download.rb
Instance Attribute Summary collapse
-
#pending ⇒ Object
readonly
Returns the value of attribute pending.
Instance Method Summary collapse
-
#initialize(options) ⇒ Download
constructor
A new instance of Download.
- #run ⇒ Object
Constructor Details
#initialize(options) ⇒ Download
Returns a new instance of Download.
12 13 14 15 16 17 |
# File 'lib/aranha/fixtures/download.rb', line 12 def initialize() @prefix = .fetch(:prefix) @prefix = '' if @prefix.blank? @download = .fetch(:download) @pending = .fetch(:pending) end |
Instance Attribute Details
#pending ⇒ Object (readonly)
Returns the value of attribute pending.
10 11 12 |
# File 'lib/aranha/fixtures/download.rb', line 10 def pending @pending end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 |
# File 'lib/aranha/fixtures/download.rb', line 19 def run url_files.each do |f| Rails.logger.info(relative_path(f)) download(url(f), target(f)) if @download end end |