class Object

Public Instance Methods

download(key) click to toggle source
# File lib/besturder.rb, line 5
def download(key)
        $PACKS[key]["dir"].each_index do |i|
                unless File.exists? $PACKS[key]["dir"][i]
                        puts "Installing #{key}..."
                        File.open($PACKS[key]["dir"][i], "w") do |file|
                                opena = open($PACKS[key]['url'][i]).read
                                opena.lines.each do |line|
                                        file << line
                                end
                        end
                        puts "The #{key} dependency has been installed"
                else
                        puts "The dependency #{key} is already installed"
                end
        end
end