Module: Deprecation::Notifier
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/deprecation/notifier.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.__deprecation_logger__(class_name, method_name, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/deprecation/notifier.rb', line 6 def __deprecation_logger__(class_name, method_name, = {}) = .symbolize_keys if [:at].nil? || [:at].to_time <= Time.now = class_name << "#" << method_name if method_name << " is deprecated" << ([:at].present?? " as of #{options[:at]}." : ".") << " " << [:message] if [:message] ActiveSupport::Deprecation.warn(, caller[1..-1]) end end |