Skip to content

Instantly share code, notes, and snippets.

@mizutaki
Created October 13, 2014 03:27
Show Gist options
  • Save mizutaki/4ec148b90bfad5183e7d to your computer and use it in GitHub Desktop.
Save mizutaki/4ec148b90bfad5183e7d to your computer and use it in GitHub Desktop.
dispatcher
module MySinatra
class Base
def self.prototype
@prototype ||= new
end
def self.call(env)
prototype.call(env)
end
def call(env)
dup.call!(env)
end
def call!(env)
[200, {'Content-Type' => 'text/plain'}, ["routing logic not implemented"]]
end
class Application < Base
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment