lib/web_page_archiver.rb
def content_type(obj)
      if obj.is_a? File
        return MIME::Types.type_for(obj.path).first
      else
        return obj.headers_hash["content-type"]
      end
    end
# Determines the contenttype of a file or download
#
# @param [File,URI] object to test
# @return [String] mime-type / content type
#

Determines the contenttype of a file or download
Determines the contenttype of a file or download
def content_type(obj)
      if obj.is_a? File
        return MIME::Types.type_for(obj.path).first
      else
        return obj.headers_hash["content-type"]
      end
    end
def content_type ( obj ) if obj . is_a? File return MIME :: Types . type_for ( obj . path ) . first else return obj . headers_hash [ "content-type" ] end end
Determines the contenttype of a file or download
Determines the contenttype of a file or download
mime-type / content type
mime - type / content type
String
obj
object to test
object to test