lib/tty/file/download_file.rb in tty-file-0.9.0 vs lib/tty/file/download_file.rb in tty-file-0.10.0
- old
+ new
@@ -12,13 +12,13 @@
DEFAULT_REDIRECTS = 3
# @options
#
- def initialize(url, dest_path, options = {})
+ def initialize(url, dest_path, limit: nil)
@uri = URI.parse(url)
@dest_path = dest_path
- @limit = options.fetch(:limit) { DEFAULT_REDIRECTS }
+ @limit = limit || DEFAULT_REDIRECTS
end
# Download a file
#
# @api public