Module: Timber::Config::Integrations

Extended by:
Integrations
Included in:
Integrations
Defined in:
lib/timber-rails/config/action_view.rb,
lib/timber-rails/config/active_record.rb,
lib/timber-rails/config/action_controller.rb

Overview

Convenience module for accessing the various ‘Timber::Integrations::*` classes through the Timber::Config object. Timber couples configuration with the class responsible for implementing it. This provides for a tighter design, but also requires the user to understand and access the various classes. This module aims to provide a simple ruby-like configuration interface for internal Timber classes.

For example:

config = Timber::Config.instance
config.integrations.active_record.silence = true

Instance Method Summary collapse

Instance Method Details

#action_controllerObject

Convenience method for accessing the Integrations::ActionController class specific configuration.

Examples:

config = Timber::Config.instance
config.integrations.action_controller.silence = true


24
25
26
# File 'lib/timber-rails/config/action_controller.rb', line 24

def action_controller
  Timber::Integrations::ActionController
end

#action_viewObject

Convenience method for accessing the Integrations::ActionView class specific configuration.

Examples:

config = Timber::Config.instance
config.integrations.action_view.silence = true


24
25
26
# File 'lib/timber-rails/config/action_view.rb', line 24

def action_view
  Timber::Integrations::ActionView
end

#active_recordObject

Convenience method for accessing the Integrations::ActiveRecord class specific configuration.

Examples:

config = Timber::Config.instance
config.integrations.active_record.silence = true


24
25
26
# File 'lib/timber-rails/config/active_record.rb', line 24

def active_record
  Timber::Integrations::ActiveRecord
end