Module: URI

Defined in:
lib/fe_core_ext/core_ext/uri.rb

Defined Under Namespace

Classes: Generic

Instance Method Summary collapse

Instance Method Details

#download(file) ⇒ Object



8
9
10
11
# File 'lib/fe_core_ext/core_ext/uri.rb', line 8

def download(file)
  binary = OpenURI.open_uri(self).read
  File.open(file, 'wb') {|f| f.write(binary)}
end