Class: Paperclip::EmptyStringAdapter

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

Constant Summary

Constants inherited from AbstractAdapter

AbstractAdapter::OS_RESTRICTED_CHARACTERS

Instance Attribute Summary

Attributes inherited from AbstractAdapter

#content_type, #original_filename, #size, #tempfile

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractAdapter

#fingerprint, #initialize, #inspect, #read

Constructor Details

This class inherits a constructor from Paperclip::AbstractAdapter

Class Method Details

.registerObject



5
6
7
8
9
# File 'lib/paperclip/io_adapters/empty_string_adapter.rb', line 5

def self.register
  Paperclip.io_adapters.register self do |target|
    target.is_a?(String) && target.empty?
  end
end

Instance Method Details

#assignment?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/paperclip/io_adapters/empty_string_adapter.rb', line 15

def assignment?
  false
end

#nil?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/paperclip/io_adapters/empty_string_adapter.rb', line 11

def nil?
  false
end