Methods
- D
Class Public methods
download(from, to)
Link
# File activesupport/test/multibyte_conformance.rb, line 10 def self.download(from, to) unless File.exist?(to) $stderr.puts "Downloading #{from} to #{to}" unless File.exist?(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