Module: Mustermann::Extension

Defined in:
lib/mustermann/extension.rb

Overview

Sinatra 1.x extension switching default pattern parsing over to Mustermann.

Examples:

With classic Sinatra application

require 'sinatra'
require 'mustermann'

register Mustermann
get('/:id', capture: /\d+/) { ... }

With modular Sinatra application

require 'sinatra/base'
require 'mustermann'

class MyApp < Sinatra::Base
  register Mustermann
  get('/:id', capture: /\d+/) { ... }
end

See Also: