Class: Protobuf::DeprecationBase
- Inherits:
-
ActiveSupport::Deprecation
- Object
- ActiveSupport::Deprecation
- Protobuf::DeprecationBase
show all
- Defined in:
- lib/protobuf/deprecation.rb
Instance Method Summary
collapse
Instance Method Details
#deprecate_methods(*args) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/protobuf/deprecation.rb', line 6
def deprecate_methods(*args)
deprecation_options = { :deprecator => self }
if args.last.is_a?(Hash)
args.last.merge!(deprecation_options)
else
args.push(deprecation_options)
end
super
end
|
#deprecation_warning(deprecated_method_name, message = nil, caller_backtrace = nil) ⇒ Object
18
19
20
21
|
# File 'lib/protobuf/deprecation.rb', line 18
def deprecation_warning(deprecated_method_name, message = nil, caller_backtrace = nil)
super(deprecated_method_name, message, caller_backtrace) unless ENV.key?('PB_IGNORE_DEPRECATIONS')
end
|