Class: Zippy::CLI
- Inherits:
-
Thor
- Object
- Thor
- Zippy::CLI
- Defined in:
- lib/zippy/cli.rb
Instance Method Summary collapse
Instance Method Details
#batch(file, n = 0) ⇒ Object
17 18 19 20 |
# File 'lib/zippy/cli.rb', line 17 def batch(file, n = 0) links = File.readlines(file).each.map(&:strip) Parallel.each(links, in_threads: n.to_i) { |link| download(link) } end |