Sha256: 1cdef633f884c7771e692afe908f8f7e70082e013115ed2f028a0ec8a8faf9fc

Contents?: true

Size: 327 Bytes

Versions: 20

Compression:

Stored size: 327 Bytes

Contents

module Paperclip
  class EmptyStringAdapter < AbstractAdapter
    def self.register
      Paperclip.io_adapters.register self do |target|
        target.is_a?(String) && target.empty?
      end
    end

    def nil?
      false
    end

    def assignment?
      false
    end
  end
end

Paperclip::EmptyStringAdapter.register

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
kt-paperclip-7.2.2 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-7.2.1 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-7.2.0 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-6.4.2 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-5.4.0 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-7.1.1 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-7.1.0 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-7.0.1 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-7.0.0 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-6.4.1 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-6.4.0 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-6.3.0 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-6.2.2 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-6.2.1 lib/paperclip/io_adapters/empty_string_adapter.rb
kt-paperclip-6.2.0 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-6.1.0 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-6.0.0 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-5.3.0 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-5.2.1 lib/paperclip/io_adapters/empty_string_adapter.rb
paperclip-5.2.0 lib/paperclip/io_adapters/empty_string_adapter.rb