Sha256: a438b844a4f89d0ef5c9beeec4d9d909db31a259d8a1b220a625e754a8a46c82
Contents?: true
Size: 582 Bytes
Versions: 23
Compression:
Stored size: 582 Bytes
Contents
require 'ostruct' require 'dragonfly/has_filename' require 'dragonfly/utils' module Dragonfly class UrlAttributes < OpenStruct include HasFilename # Updating ext / basename also updates the name def empty? @table.reject{|k, v| v.nil? }.empty? end # Hack so we can use .send('format') and it not call the private Kernel method def format @table[:format] end def extract(keys) keys.inject({}) do |attrs, key| value = send(key) attrs[key] = value unless Utils.blank?(value) attrs end end end end
Version data entries
23 entries across 23 versions & 1 rubygems