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 509 def mime_type(type=nil || (return), value = nil) 510 return type.to_s if type.to_s.include?('/') 511 type = ".#{type}" unless type.to_s[0] == ?. 512 if value 513 Rack::Mime::MIME_TYPES[type] = value 514 else 515 Rack::Mime.mime_type(type, nil) 516 end 517 end