Module: ActiveSupport::Deprecation
- Defined in:
- lib/monetra/active_support/deprecation.rb
Defined Under Namespace
Modules: Assertions, ClassMethods Classes: DeprecatedInstanceVariableProxy
Constant Summary collapse
- DEFAULT_BEHAVIORS =
Choose the default warn behavior according to RAILS_ENV. Ignore deprecation warnings in production.
{ 'test' => Proc.new { || $stderr.puts }, 'development' => Proc.new { || RAILS_DEFAULT_LOGGER.warn }, }
Class Method Summary collapse
Class Method Details
.default_behavior ⇒ Object
15 16 17 |
# File 'lib/monetra/active_support/deprecation.rb', line 15 def default_behavior DEFAULT_BEHAVIORS[RAILS_ENV.to_s] if defined?(RAILS_ENV) end |
.warn(message = nil, callstack = caller) ⇒ Object
11 12 13 |
# File 'lib/monetra/active_support/deprecation.rb', line 11 def warn( = nil, callstack = caller) behavior.call((callstack, )) if behavior end |