Module: DeprecatedAttributes

Extended by:
ActiveSupport::Concern
Included in:
ActiveRecord::Base
Defined in:
lib/deprecated_attributes.rb,
lib/notifiers/rails_logger.rb,
lib/deprecated_attributes/errors.rb,
lib/deprecated_attributes/version.rb,
lib/deprecated_attributes/configuration.rb

Overview

Configuration for DeprecatedAttributes

Defined Under Namespace

Modules: ClassMethods Classes: Configuration, DeprecatedAttributeError, LogSubscriber

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.configurationObject



5
6
7
# File 'lib/deprecated_attributes/configuration.rb', line 5

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Allows configuration options to be set using a block.

Yields:



10
11
12
# File 'lib/deprecated_attributes/configuration.rb', line 10

def self.configure
  yield(configuration)
end

.included(base) ⇒ Object



21
22
23
# File 'lib/deprecated_attributes.rb', line 21

def self.included(base)
  base.extend ClassMethods
end

.resetObject

Resets current configuration to default values.



15
16
17
# File 'lib/deprecated_attributes/configuration.rb', line 15

def self.reset
  @configuration = Configuration.new
end