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