Skip to content

Class HTM::Sinatra::Middleware

Inherits Object
Defined in lib/htm/integrations/sinatra.rb

Rack middleware for HTM connection management

Ensures database connections are properly managed across requests. With Sequel's fiber-safe connection pooling, this is largely automatic.

@example Use in Sinatra app

class MyApp < Sinatra::Base
  use HTM::Sinatra::Middleware
end

Public Class Methods

store_config!()

Store the connection config at startup (called from register_htm)

Public Instance Methods

call(env)

Not documented.

initialize(app, options = {})

  • @return [Middleware] a new instance of Middleware