Skip to content

Instantly share code, notes, and snippets.

@airy
airy / my_app.rb
Created May 6, 2014 15:59 — forked from rkh/my_app.rb
require 'sinatra/base'
class MyApp < Sinatra::Base
@@my_app = {}
def self.new(*) self < MyApp ? super : Rack::URLMap.new(@@my_app) end
def self.map(url) @@my_app[url] = self end
class FooController < MyApp
map '/foo'