Sha256: 4c76d33516faf960e766bfc2c352a40aff1ea353feba910120c27de22adf976f
Contents?: true
Size: 497 Bytes
Versions: 8
Compression:
Stored size: 497 Bytes
Contents
module Saviour class SourceFilenameExtractor def initialize(source) @source = source end def detected_filename original_filename || path_filename end def original_filename value = @source.original_filename if @source.respond_to?(:original_filename) value if !value.nil? && value != '' end def path_filename value = @source.path if @source.respond_to?(:path) ::File.basename(value) if !value.nil? && value != '' end end end
Version data entries
8 entries across 8 versions & 1 rubygems