Class: Mongoid::Deprecation
- Inherits:
-
ActiveSupport::Deprecation
- Object
- ActiveSupport::Deprecation
- Mongoid::Deprecation
- Defined in:
- build/mongoid-master/lib/mongoid/deprecation.rb
Overview
Utility class for logging deprecation warnings.
Instance Method Summary collapse
-
#behavior ⇒ Array<Proc>
Overrides default ActiveSupport::Deprecation behavior to use Mongoid’s logger.
Instance Method Details
#behavior ⇒ Array<Proc>
Overrides default ActiveSupport::Deprecation behavior to use Mongoid’s logger.
18 19 20 21 22 23 24 |
# File 'build/mongoid-master/lib/mongoid/deprecation.rb', line 18 def behavior @behavior ||= Array(->(, callstack, _deprecation_horizon, _gem_name) { logger = Mongoid.logger logger.warn() logger.debug(callstack.join("\n ")) if debug }) end |