Sha256: 1528cafb66d81708f0bdb2b7bb4e68233e0383a7d893f6b3b4b2843a86a33783
Contents?: true
Size: 743 Bytes
Versions: 40
Compression:
Stored size: 743 Bytes
Contents
module Vagrant module Downloaders # Represents a base class for a downloader. A downloader handles # downloading a box file to a temporary file. class Base include Vagrant::Util def initialize(ui) @ui = ui end # Tests whether a URL matches this download. Subclasses must # override this and return `true` for any URLs they wish to # handle. def self.match?(url); false; end # Called prior to execution so any error checks can be done def prepare(source_url); end # Downloads the source file to the destination file. It is up to # implementors of this class to handle the logic. def download!(source_url, destination_file); end end end end
Version data entries
40 entries across 40 versions & 6 rubygems