Sha256: 9393fdad14d23471adb646b67841573e2c8b628a8cdf7285e415acea2d12a6cd

Contents?: true

Size: 668 Bytes

Versions: 34

Compression:

Stored size: 668 Bytes

Contents

module Timber
  module Integrations
    module Rack
      # Base class that all Timber Rack middlewares extend. See the class level methods for
      # configuration options.
      class Middleware
        class << self
          # Easily enable / disable specific middlewares.
          #
          # @example
          #   Timber::Integrations::Rack::UserContext.enabled = false
          def enabled=(value)
            @enabled = value
          end

          # Accessor method for {#enabled=}.
          def enabled?
            @enabled != false
          end
        end

        def initialize(app)
          @app = app
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
timber-2.6.2 lib/timber/integrations/rack/middleware.rb
timber-2.6.1 lib/timber/integrations/rack/middleware.rb
timber-2.6.0 lib/timber/integrations/rack/middleware.rb
timber-2.6.0.pre.beta2 lib/timber/integrations/rack/middleware.rb
timber-2.6.0.pre.beta1 lib/timber/integrations/rack/middleware.rb
timber-2.5.1 lib/timber/integrations/rack/middleware.rb
timber-2.5.0 lib/timber/integrations/rack/middleware.rb
timber-2.4.0 lib/timber/integrations/rack/middleware.rb
timber-2.3.4 lib/timber/integrations/rack/middleware.rb
timber-2.3.3 lib/timber/integrations/rack/middleware.rb
timber-2.3.2 lib/timber/integrations/rack/middleware.rb
timber-2.3.1 lib/timber/integrations/rack/middleware.rb
timber-2.3.0 lib/timber/integrations/rack/middleware.rb
timber-2.2.3 lib/timber/integrations/rack/middleware.rb
timber-2.2.2 lib/timber/integrations/rack/middleware.rb
timber-2.2.1 lib/timber/integrations/rack/middleware.rb
timber-2.2.0 lib/timber/integrations/rack/middleware.rb
timber-2.1.10 lib/timber/integrations/rack/middleware.rb
timber-2.1.9 lib/timber/integrations/rack/middleware.rb
timber-2.1.8 lib/timber/integrations/rack/middleware.rb