Sha256: c945b4f7ac5b318ce8f907c2b7af8890d91c35e01f7e2613de712a89eb205736

Contents?: true

Size: 351 Bytes

Versions: 5

Compression:

Stored size: 351 Bytes

Contents

module DataMapper
  class IdentityMaps
    def initialize(app, name = :default)
      @app = app
      @name = name.to_sym
    end
  
    def call(env)
      status, headers, response = nil, nil, nil
      DataMapper.repository(@name) do
        status, headers, response = @app.call(env)
      end
      [status, headers, response]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rack-datamapper-0.2.6 lib/rack_datamapper/identity_maps.rb
rack-datamapper-0.2.5 lib/rack_datamapper/identity_maps.rb
rack-datamapper-0.2.4 lib/rack_datamapper/identity_maps.rb
rack-datamapper-0.2.3 lib/rack_datamapper/identity_maps.rb
rack-datamapper-0.2.2 lib/rack_datamapper/identity_maps.rb