class Logged::Configuration

logged configuration

Constants

DEFAULT_VALUES

Default values for configuration options

Public Class Methods

init_default_options(config, ignore_defaults = []) click to toggle source
# File lib/logged/configuration.rb, line 19
def self.init_default_options(config, ignore_defaults = [])
  DEFAULT_VALUES.each do |key, value|
    next if ignore_defaults.include?(key)

    config[key] = if value.is_a?(Proc)
                    value.call
                  else
                    value
                  end
  end
end
new() click to toggle source
Calls superclass method
# File lib/logged/configuration.rb, line 50
def initialize
  super { |hash, key| hash[key] = ComponentOptions.new }

  Configuration.init_default_options(self)

  self.loggers = ::ActiveSupport::OrderedOptions.new { |hash, key| hash[key] = LoggerOptions.new }
end