module Nuggets::URI::ContentTypeMixin

Public Class Methods

extended(base) click to toggle source
# File lib/nuggets/uri/content_type_mixin.rb, line 33
def self.extended(base)
  base.extend Nuggets::URI::ExistMixin
end

Public Instance Methods

content_type(uri) → aString or +nil+ click to toggle source

Return the content type of uri, or nil if not found.

# File lib/nuggets/uri/content_type_mixin.rb, line 41
def content_type(uri)
  exist?(uri) { |res| res.content_type }
end