Sha256: 6bae787baf18af49ffca39e4c803d9b26436e4ca35f4524a3897c3639a6b7306

Contents?: true

Size: 254 Bytes

Versions: 9

Compression:

Stored size: 254 Bytes

Contents

module Toy
  module Middleware
    class IdentityMap
      def initialize(app)
        @app = app
      end

      def call(env)
        Toy.identity_map.clear
        @app.call(env)
      ensure
        Toy.identity_map.clear
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
toystore-0.8.3 lib/toy/middleware/identity_map.rb
toystore-0.8.2 lib/toy/middleware/identity_map.rb
toystore-0.8.1 lib/toy/middleware/identity_map.rb
toystore-0.8.0 lib/toy/middleware/identity_map.rb
toystore-0.7.0 lib/toy/middleware/identity_map.rb
toystore-0.6.6 lib/toy/middleware/identity_map.rb
toystore-0.6.5 lib/toy/middleware/identity_map.rb
toystore-0.6.4 lib/toy/middleware/identity_map.rb
toystore-0.6.3 lib/toy/middleware/identity_map.rb