Class: Miteru::Downloader
- Inherits:
-
Object
- Object
- Miteru::Downloader
- Defined in:
- lib/miteru/downloader.rb
Instance Attribute Summary collapse
-
#base_dir ⇒ Object
readonly
Returns the value of attribute base_dir.
-
#memo ⇒ Object
readonly
Returns the value of attribute memo.
Instance Method Summary collapse
- #download_kits(kits) ⇒ Object
-
#initialize(base_dir = "/tmp") ⇒ Downloader
constructor
A new instance of Downloader.
Constructor Details
#initialize(base_dir = "/tmp") ⇒ Downloader
Returns a new instance of Downloader.
12 13 14 15 16 |
# File 'lib/miteru/downloader.rb', line 12 def initialize(base_dir = "/tmp") @base_dir = base_dir @memo = {} raise ArgumentError, "#{base_dir} is not exist." unless Dir.exist?(base_dir) end |
Instance Attribute Details
#base_dir ⇒ Object (readonly)
Returns the value of attribute base_dir.
9 10 11 |
# File 'lib/miteru/downloader.rb', line 9 def base_dir @base_dir end |
#memo ⇒ Object (readonly)
Returns the value of attribute memo.
10 11 12 |
# File 'lib/miteru/downloader.rb', line 10 def memo @memo end |
Instance Method Details
#download_kits(kits) ⇒ Object
18 19 20 |
# File 'lib/miteru/downloader.rb', line 18 def download_kits(kits) kits.each { |kit| download_kit kit } end |