lib/roda/plugins/sinatra_helpers.rb
# If a type and value are given, set the value in Rack's MIME registry.
# If only a type is given, lookup the type in Rack's MIME registry and
# return it.
If a type and value are given, set the value in Rack's MIME registry.
If only a type is given, lookup the type in Rack's MIME registry and
return it.
If a type and value are given set the value in Rack ' s MIME registry . If only a type is given lookup the type in Rack ' s MIME registry and return it .
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
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
If a type and value are given, set the value in Rack's MIME registry.
If a type and value are given set the value in Rack ' s MIME registry .
type
value