class Berkshelf::Downloader
def download(*args, &block)
-
(String)
-
Raises:
-
(CookbookNotFound)
-
Options Hash:
(**options)
-
:path
(String
) --
Parameters:
-
version
(String
) -- -
name
(String
) --
def download(*args, &block) # options are ignored # options = args.last.is_a?(Hash) ? args.pop : Hash.new dependency, version = args sources.each do |source| if ( result = try_download(source, dependency, version) ) if block_given? value = yield result FileUtils.rm_rf(result) return value end return result end end raise CookbookNotFound.new(dependency, version, "in any of the sources") end