ministryofjustice/atet

View on GitHub
app/services/content_type.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'open3'
module ContentType
  def of(file)
    Open3.capture2('file', '-b', '--mime', file.path).first.split('; ').first
  end

  module_function :of
end