Class: Logtail::Integrations::Rack::Middleware
- Inherits:
-
Object
- Object
- Logtail::Integrations::Rack::Middleware
- Defined in:
- lib/logtail-rack/middleware.rb
Overview
Base class that all Logtail Rack middlewares extend. See the class level methods for configuration options.
Direct Known Subclasses
ErrorEvent, HTTPContext, HTTPEvents, SessionContext, UserContext
Class Method Summary collapse
-
.enabled=(value) ⇒ Object
Easily enable / disable specific middlewares.
-
.enabled? ⇒ Boolean
Accessor method for #enabled=.
Instance Method Summary collapse
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
22 23 24 |
# File 'lib/logtail-rack/middleware.rb', line 22 def initialize(app) @app = app end |
Class Method Details
.enabled=(value) ⇒ Object
Easily enable / disable specific middlewares.
12 13 14 |
# File 'lib/logtail-rack/middleware.rb', line 12 def enabled=(value) @enabled = value end |
.enabled? ⇒ Boolean
Accessor method for #enabled=.
17 18 19 |
# File 'lib/logtail-rack/middleware.rb', line 17 def enabled? @enabled != false end |