module Rack::Mime
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/rack/mime.rbs module Rack::Mime def mime_type: (String ext, ?String fallback) -> String end
def match?(value, matcher)
def match?(value, matcher) v1, v2 = value.split('/', 2) m1, m2 = matcher.split('/', 2) (m1 == '*' || v1 == m1) && (m2.nil? || m2 == '*' || m2 == v2) end
def mime_type(ext, fallback = 'application/octet-stream')
Experimental RBS support (using type sampling data from the type_fusion
project).
def mime_type: (String ext, ?String fallback) -> String
This signature was generated using 1 sample from 1 application.
def mime_type(ext, fallback = 'application/octet-stream') MIME_TYPES.fetch(ext.to_s.downcase, fallback) end