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.1.7 lib/timber/integrations/rack/middleware.rb
timber-2.1.6 lib/timber/integrations/rack/middleware.rb
timber-2.1.5 lib/timber/integrations/rack/middleware.rb
timber-2.1.4 lib/timber/integrations/rack/middleware.rb
timber-2.1.3 lib/timber/integrations/rack/middleware.rb
timber-2.1.2 lib/timber/integrations/rack/middleware.rb
timber-2.1.1 lib/timber/integrations/rack/middleware.rb
timber-2.1.0 lib/timber/integrations/rack/middleware.rb
timber-2.1.0.rc6 lib/timber/integrations/rack/middleware.rb
timber-2.1.0.rc5 lib/timber/integrations/rack/middleware.rb
timber-2.1.0.rc4 lib/timber/integrations/rack/middleware.rb
timber-2.1.0.rc3 lib/timber/integrations/rack/middleware.rb
timber-2.1.0.rc2 lib/timber/integrations/rack/middleware.rb
timber-2.1.0.rc1 lib/timber/integrations/rack/middleware.rb