Class: Dynamoid::Middleware::IdentityMap

Inherits:
Object
  • Object
show all
Defined in:
lib/dynamoid/middleware/identity_map.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ IdentityMap

Returns a new instance of IdentityMap.



7
8
9
# File 'lib/dynamoid/middleware/identity_map.rb', line 7

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



11
12
13
14
15
16
# File 'lib/dynamoid/middleware/identity_map.rb', line 11

def call(env)
  Dynamoid::IdentityMap.clear
  @app.call(env)
ensure
  Dynamoid::IdentityMap.clear
end