lib/rb/lib/thrift/deprecation.rb
# Provides an alternate name for the class for deprecation purposes
# Example:
#   deprecate_class! :TBinaryProtocol => Thrift::BinaryProtocol
#--
# at the moment this only works for creating top-level constants
# if necessary, this can be extended to take something like :'Thrift::TBinaryProtocol'
# alternately, Module can be extended with a similar method
Provides an alternate name for the class for deprecation purposes
Example:
deprecate_class.

at the moment this only works for creating top-level constants
if necessary, this can be extended to take something like :'Thrift::TBinaryProtocol'
alternately, Module can be extended with a similar method
Provides an alternate name for the class for deprecation purposes Example : deprecate_class . at the moment this only works for creating top - level constants if necessary this can be extended to take something like : ' Thrift :: TBinaryProtocol ' alternately Module can be extended with a similar method
def deprecate_class!(klasses)
    return unless Thrift::DEPRECATION
    klasses.each_pair do |old, new|
      raise "deprecate_class! expected Class, called with #{new}" unless new.is_a? Class
      Object.const_set old, Thrift::DeprecationProxy.new_class(new, old)
    end
  end
def deprecate_class! ( klasses ) return unless Thrift :: DEPRECATION klasses . each_pair do | old , new | raise "deprecate_class! expected Class, called with #{new}" unless new . is_a? Class Object . const_set old , Thrift :: DeprecationProxy . new_class ( new , old ) end end
Provides an alternate name for the class for deprecation purposes
Example:
deprecate_class!
Provides an alternate name for the class for deprecation purposes Example : deprecate_class!
klasses
<not_specific>