Sha256: 513ac95408c949775e9ccaec332cb3907895d8a29f2071d5690906a2fc4706ab

Contents?: true

Size: 405 Bytes

Versions: 24

Compression:

Stored size: 405 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Web
    module Middleware
      #
      # DB connection adapter for Rack app
      #
      class Connection
        include Concerns::DatabaseConnectable

        attr_reader :app

        def initialize(app)
          @app = app
        end

        def call(env)
          with_db_connection { app.call env }
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mihari-8.0.2 lib/mihari/web/middleware/connection.rb
mihari-8.0.1 lib/mihari/web/middleware/connection.rb
mihari-8.0.0 lib/mihari/web/middleware/connection.rb
mihari-7.6.4 lib/mihari/web/middleware/connection.rb
mihari-7.6.3 lib/mihari/web/middleware/connection.rb
mihari-7.6.2 lib/mihari/web/middleware/connection.rb
mihari-7.6.1 lib/mihari/web/middleware/connection.rb
mihari-7.6.0 lib/mihari/web/middleware/connection.rb
mihari-7.5.0 lib/mihari/web/middleware/connection.rb
mihari-7.4.0 lib/mihari/web/middleware/connection.rb
mihari-7.3.2 lib/mihari/web/middleware/connection.rb
mihari-7.3.1 lib/mihari/web/middleware/connection.rb
mihari-7.3.0 lib/mihari/web/middleware/connection.rb
mihari-7.2.0 lib/mihari/web/middleware/connection.rb
mihari-7.1.3 lib/mihari/web/middleware/connection.rb
mihari-7.1.2 lib/mihari/web/middleware/connection.rb
mihari-7.1.1 lib/mihari/web/middleware/connection.rb
mihari-7.1.0 lib/mihari/web/middleware/connection.rb
mihari-7.0.5 lib/mihari/web/middleware/connection.rb
mihari-7.0.4 lib/mihari/web/middleware/connection.rb