Class: Protobuf::Deprecation

Inherits:
DeprecationBase show all
Defined in:
lib/protobuf/deprecation.rb

Instance Method Summary collapse

Methods inherited from DeprecationBase

#deprecate_methods, #deprecation_warning

Instance Method Details

#define_deprecated_methods(target_module, method_hash) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/protobuf/deprecation.rb', line 25

def define_deprecated_methods(target_module, method_hash)
  target_module.module_eval do
    method_hash.each do |old_method, new_method|
      alias_method old_method, new_method
    end
  end

  deprecate_methods(target_module, method_hash)
end