Class: Paperclip::NilAdapter

Inherits:
AbstractAdapter show all
Defined in:
lib/paperclip/io_adapters/nil_adapter.rb

Constant Summary

Constant Summary

Constants inherited from AbstractAdapter

AbstractAdapter::OS_RESTRICTED_CHARACTERS

Instance Method Summary (collapse)

Methods inherited from AbstractAdapter

#assignment?, #fingerprint, #inspect

Constructor Details

- (NilAdapter) initialize(target)

Returns a new instance of NilAdapter



3
4
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 3

def initialize(target)
end

Instance Method Details

- (Object) content_type



10
11
12
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 10

def content_type
  ""
end

- (Boolean) eof?

Returns:

  • (Boolean)


26
27
28
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 26

def eof?
  true
end

- (Boolean) nil?

Returns:

  • (Boolean)


18
19
20
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 18

def nil?
  true
end

- (Object) original_filename



6
7
8
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 6

def original_filename
  ""
end

- (Object) read(*args)



22
23
24
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 22

def read(*args)
  nil
end

- (Object) size



14
15
16
# File 'lib/paperclip/io_adapters/nil_adapter.rb', line 14

def size
  0
end