Class: Nomo::Rack::Middleware::UnitOfWork
- Inherits:
-
Object
- Object
- Nomo::Rack::Middleware::UnitOfWork
- Defined in:
- lib/nomo/rack/middleware/unit_of_work.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ UnitOfWork
constructor
A new instance of UnitOfWork.
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 |