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 414 def mime_type(type=nil || (return), value = nil) 415 return type.to_s if type.to_s.include?('/') 416 type = ".#{type}" unless type.to_s[0] == ?. 417 if value 418 Rack::Mime::MIME_TYPES[type] = value 419 else 420 Rack::Mime.mime_type(type, nil) 421 end 422 end