Class: Wouter
- Inherits:
-
Object
show all
- Defined in:
- lib/wouter.rb
Defined Under Namespace
Classes: Endpoint, Request, Response, Wrapper
Class Method Summary
collapse
Class Method Details
.app ⇒ Object
56
57
58
|
# File 'lib/wouter.rb', line 56
def self.app
@app ||= Rack::Builder.new
end
|
.build ⇒ Object
84
85
86
87
|
# File 'lib/wouter.rb', line 84
def self.build
app.run(Wrapper.new(routes))
app.to_app
end
|
.middleware(klass, *args, &block) ⇒ Object
77
78
79
|
# File 'lib/wouter.rb', line 77
def middleware(klass, *args, &block)
app.use(klass, *args, &block)
end
|
.routes ⇒ Object
60
61
62
|
# File 'lib/wouter.rb', line 60
def self.routes
@routes ||= []
end
|