class EXEL::Providers::LocalFileProvider
The default remote provider. Doesn't actually upload and download files to and from remote storage, but rather just works with local files.
Public Class Methods
remote?(value)
click to toggle source
# File lib/exel/providers/local_file_provider.rb, line 18 def self.remote?(value) value.is_a?(RemoteValue) end
Public Instance Methods
download(remote_value)
click to toggle source
# File lib/exel/providers/local_file_provider.rb, line 12 def download(remote_value) scheme = remote_value.uri.scheme raise "Unsupported URI scheme '#{scheme}'" unless scheme == 'file' File.open(remote_value.uri.path) end
upload(file)
click to toggle source
# File lib/exel/providers/local_file_provider.rb, line 8 def upload(file) RemoteValue.new(URI("file://#{File.absolute_path(file)}")) end