Class: CarrierWave::Uploader::Download::RemoteFile
- Inherits:
-
Object
- Object
- CarrierWave::Uploader::Download::RemoteFile
show all
- Defined in:
- lib/carrierwave/uploader/download.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of RemoteFile.
15
16
17
|
# File 'lib/carrierwave/uploader/download.rb', line 15
def initialize(uri)
@uri = uri
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
41
42
43
|
# File 'lib/carrierwave/uploader/download.rb', line 41
def method_missing(*args, &block)
file.send(*args, &block)
end
|
Instance Method Details
#http? ⇒ Boolean
27
28
29
|
# File 'lib/carrierwave/uploader/download.rb', line 27
def http?
@uri.scheme =~ /^https?$/
end
|
#original_filename ⇒ Object
19
20
21
|
# File 'lib/carrierwave/uploader/download.rb', line 19
def original_filename
File.basename(file.base_uri.path)
end
|
#respond_to?(*args) ⇒ Boolean
23
24
25
|
# File 'lib/carrierwave/uploader/download.rb', line 23
def respond_to?(*args)
super or file.respond_to?(*args)
end
|