module FetchAndProcess::LocalFile

Public Class Methods

included(base) click to toggle source
# File lib/fetch_and_process/local_file.rb, line 8
def self.included(base)
  base.add_handler('file', :file_handler)
end

Public Instance Methods

file_handler() click to toggle source
# File lib/fetch_and_process/local_file.rb, line 12
def file_handler
  from = uri.to_s.sub(%r{^file://}, '')
  from = "./#{from}" if from[0] != '/'
  FileUtils.cp from, cache_location
  cache_location
end