Sha256: 63c107757eae4224e3dc1d00d06258291ae2a667bef9bd66fe39852cbfac1070

Contents?: true

Size: 344 Bytes

Versions: 8

Compression:

Stored size: 344 Bytes

Contents

# frozen_string_literal: true

module SdrClient
  class RedesignedClient
    module Operations
      # Mime-type for this file.
      class MimeType
        NAME = 'mime_type'

        def self.for(filepath:, **)
          argv = Shellwords.escape(filepath)
          `file --mime-type -b #{argv}`.chomp
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sdr-client-2.18.0 lib/sdr_client/redesigned_client/operations/mime_type.rb
sdr-client-2.17.0 lib/sdr_client/redesigned_client/operations/mime_type.rb
sdr-client-2.16.0 lib/sdr_client/redesigned_client/operations/mime_type.rb
sdr-client-2.13.2 lib/sdr_client/redesigned_client/operations/mime_type.rb
sdr-client-2.13.1 lib/sdr_client/redesigned_client/operations/mime_type.rb
sdr-client-2.13.0 lib/sdr_client/redesigned_client/operations/mime_type.rb
sdr-client-2.13.0.beta2 lib/sdr_client/redesigned_client/operations/mime_type.rb
sdr-client-2.13.0.beta1 lib/sdr_client/redesigned_client/operations/mime_type.rb