Methods
D
Class Public methods
download(from, to)
# File rails/activesupport/test/multibyte_conformance.rb, line 10
def self.download(from, to)
  unless File.exist?(to)
    $stderr.puts "Downloading #{from} to #{to}"
    unless File.exists?(File.dirname(to))
      system "mkdir -p #{File.dirname(to)}"
    end
    open(from) do |source|
      File.open(to, 'w') do |target|
        source.each_line do |l|
          target.write l
        end
      end
     end
   end
end