Class: Paperclip::NilAdapter
Constant Summary
AbstractAdapter::OS_RESTRICTED_CHARACTERS
Instance Attribute Summary
#tempfile
Class Method Summary
collapse
Instance Method Summary
collapse
#assignment?, #fingerprint, #inspect
Constructor Details
#initialize(_target, _options = {}) ⇒ NilAdapter
Returns a new instance of NilAdapter.
9
|
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 9
def initialize(_target, _options = {}); end
|
Class Method Details
.register ⇒ Object
3
4
5
6
7
|
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 3
def self.register
Paperclip.io_adapters.register self do |target|
target.nil? || ((Paperclip::Attachment === target) && !target.present?)
end
end
|
Instance Method Details
#content_type ⇒ Object
15
16
17
|
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 15
def content_type
""
end
|
#eof? ⇒ Boolean
31
32
33
|
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 31
def eof?
true
end
|
#nil? ⇒ Boolean
23
24
25
|
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 23
def nil?
true
end
|
#original_filename ⇒ Object
11
12
13
|
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 11
def original_filename
""
end
|
#read(*_args) ⇒ Object
27
28
29
|
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 27
def read(*_args)
nil
end
|
#size ⇒ Object
19
20
21
|
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 19
def size
0
end
|