module Roda::RodaPlugins::SinatraHelpers::ClassMethods

def mime_type(type=nil || (return), value = nil)

return it.
If only a type is given, lookup the type in Rack's MIME registry and
If a type and value are given, set the value in Rack's MIME registry.
def mime_type(type=nil || (return), value = nil)
  return type.to_s if type.to_s.include?('/')
  type = ".#{type}" unless type.to_s[0] == ?.
  if value
    Rack::Mime::MIME_TYPES[type] = value
  else
    Rack::Mime.mime_type(type, nil)
  end
end