Public Instance methods
mime_type(type=nil || (return), value = nil)
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.
[show source]
# File lib/roda/plugins/sinatra_helpers.rb 418 def mime_type(type=nil || (return), value = nil) 419 return type.to_s if type.to_s.include?('/') 420 type = ".#{type}" unless type.to_s[0] == ?. 421 if value 422 Rack::Mime::MIME_TYPES[type] = value 423 else 424 Rack::Mime.mime_type(type, nil) 425 end 426 end