Sha256: ac299335d1f3969e077c913d21467016772a7cbd11cfdb4c0d443b763c1977c8
Contents?: true
Size: 704 Bytes
Versions: 14
Compression:
Stored size: 704 Bytes
Contents
require 'sinatra/base' require 'slim' module ServiceContract module Avro class Documentation < Sinatra::Base get '/:version/:protocol' do version = service.find(params[:version]) protocol = version.protocol(params[:protocol]) slim :protocol, locals: { version: version, protocol: protocol } end get '/:version' do version = service.find(params[:version]) if version slim :version, locals: { version: version } else status 404 end end get '/' do slim :homepage end helpers do def service raise :not_implemented end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems