Class: RailscastsDownload::Downloader
- Inherits:
-
Object
- Object
- RailscastsDownload::Downloader
- Defined in:
- lib/railscasts_download/downloader.rb
Instance Method Summary collapse
Instance Method Details
#get(uri) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/railscasts_download/downloader.rb', line 3 def get( uri ) filename = uri.split( '/' ).last unless File.exists? filename p %x(wget #{uri} -O #{filename}.tmp ) p %x(mv #{filename}.tmp #{filename} ) end end |