Sha256: 507d1874f5eae76a72329b6a9a2392749666dbaf2fa11d3b964a8da7317ad752
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
module Timber # An integration represent an integration for an entire library. For example, `Rack`. # While the Timber `Rack` integration is comprised of multiple middlewares, the # `Timber::Integrations::Rack` module is an entire integration that extends this module. module Integration # Easily sisable entire library integrations. This is like removing the code from # Timber. It will not touch this library and the library will function as it would # without Timber. # # @example # Timber::Integrations::ActiveRecord.enabled = false def enabled=(value) @enabled = value end # Accessor method for {#enabled=} def enabled? @enabled != false end # Silences a library's logs. This ensures that logs are not generated at all # from this library. # # @example # Timber::Integrations::ActiveRecord.silence = true def silence=(value) @silence = value end # Accessor method for {#silence=} def silence? @silence == true end # Abstract method that each integration must implement. def integrate! raise NotImplementedError.new end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
timber-3.0.1 | lib/timber/integration.rb |
timber-3.0.0 | lib/timber/integration.rb |