Class: Sinatra::DynamicMatic::Middleware

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra/dynamicmatic/middleware.rb

Instance Method Summary collapse

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