Sha256: 67da73683f230288b42e554589fc22e7751df4a62eaab016d304964602547beb
Contents?: true
Size: 276 Bytes
Versions: 35
Compression:
Stored size: 276 Bytes
Contents
require 'sinatra' TYPES = { css: 'text/css', png: 'image/png', excel: 'application/vnd.ms-excel', } get '/' do TYPES.keys.map { |k| "<a href='#{k}'></a>" }.join end TYPES.each do |k, v| get "/#{k}" do headers 'Content-Type' => v end end
Version data entries
35 entries across 35 versions & 1 rubygems