Parent

Methods

Class/Module Index [+]

Quicksearch

Rack::Mongoid::Middleware::IdentityMap

This middleware contains the behaviour needed to properly use the identity map in Rack based applications.

Public Instance Methods

call(env) click to toggle source

Make the request with the provided environment.

@example Make the request. identity_map.call(env)

@param [ Object ] env The environment.

@return [ Array ] The status, headers, and response.

@since 2.1.0

# File lib/rack/mongoid/middleware/identity_map.rb, line 31
def call(env)
  ::Mongoid.unit_of_work { @app.call(env) }
end

Public Class Methods

new(app) click to toggle source

Initialize the new middleware.

@example Init the middleware. IdentityMap.new(app)

@param [ Object ] app The application.

@since 2.1.0

# File lib/rack/mongoid/middleware/identity_map.rb, line 17
def initialize(app)
  @app = app
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.