Class: Sinatra::DynamicMatic::Middleware
- Inherits:
-
Object
- Object
- Sinatra::DynamicMatic::Middleware
- Defined in:
- lib/sinatra/dynamicmatic/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
4 5 6 7 |
# File 'lib/sinatra/dynamicmatic/middleware.rb', line 4 def initialize(app) @app = app @server = StaticMatic::Server.new(app.send(:staticmatic), @app) end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 |
# File 'lib/sinatra/dynamicmatic/middleware.rb', line 9 def call(env) @server.call(env) end |