Class: Nomo::Rack::Middleware::UnitOfWork

Inherits:
Object
  • Object
show all
Defined in:
lib/nomo/rack/middleware/unit_of_work.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ UnitOfWork

Returns a new instance of UnitOfWork.



5
6
7
# File 'lib/nomo/rack/middleware/unit_of_work.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
# File 'lib/nomo/rack/middleware/unit_of_work.rb', line 9

def call(env)
  ::Nomo.unit_of_work { @app.call(env) }
end