postrank-labs/goliath — pull request #108 by schmurfy (2011-12-07 20:46:56+00:00)
Title: allow using instances in maps

This patch allows this:

class Test < Goliath::API

def initialize(name)
@name = name
end

def response(env)
[200, {}, [@name]]
end
end

class Router < Goliath::API
map '/', Test.new('yeah !')
map '/yo', Test.new('yo !')
end

I needed it to specialize my api classes.