class Sinatra::Base
def provides(*types)
def provides(*types) types.map! { |t| mime_type(t) } condition do matching_types = (request.accept & types) unless matching_types.empty? content_type matching_types.first true else false end end end
def provides(*types) types.map! { |t| mime_type(t) } condition do matching_types = (request.accept & types) unless matching_types.empty? content_type matching_types.first true else false end end end