Sha256: e0fac0c23af475170288c966d33487a22249a100df84b7d98b5717971d7b5c63

Contents?: true

Size: 920 Bytes

Versions: 34

Compression:

Stored size: 920 Bytes

Contents

require "timber/integrations/action_controller"
require "timber/integrations/action_dispatch"
require "timber/integrations/action_view"
require "timber/integrations/active_record"
require "timber/integrations/rack"
require "timber/integrations/rails"

module Timber
  # Namespace for all integrations. Each integration provides it's own settings.
  # And all integrations can be disabled with the {.enabled=} class method.
  module Integrations
    # Disable / enable _all_ integrations with one setting.
    def self.enabled=(value)
      ActionController.enabled = value
      ActionView.enabled = value
      ActiveRecord.enabled = value
      Rack.enabled = value
    end

    # Integrates all enabled integrations in one call.
    def self.integrate!
      ActionController.integrate!
      ActionDispatch.integrate!
      ActionView.integrate!
      ActiveRecord.integrate!
      Rails.integrate!
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
timber-2.1.7 lib/timber/integrations.rb
timber-2.1.6 lib/timber/integrations.rb
timber-2.1.5 lib/timber/integrations.rb
timber-2.1.4 lib/timber/integrations.rb
timber-2.1.3 lib/timber/integrations.rb
timber-2.1.2 lib/timber/integrations.rb
timber-2.1.1 lib/timber/integrations.rb
timber-2.1.0 lib/timber/integrations.rb
timber-2.1.0.rc6 lib/timber/integrations.rb
timber-2.1.0.rc5 lib/timber/integrations.rb
timber-2.1.0.rc4 lib/timber/integrations.rb
timber-2.1.0.rc3 lib/timber/integrations.rb
timber-2.1.0.rc2 lib/timber/integrations.rb
timber-2.1.0.rc1 lib/timber/integrations.rb