lib/pry-doc/pry_ext/method_info.rb
##
# Retrieves aliases of the given method.
#
# @param [Method, UnboundMethod] meth The method object
# @return [Array<UnboundMethod>] the aliases of the given method if they
#   exist, otherwise an empty array
Retrieves aliases of the given method.
Retrieves aliases of the given method .
def aliases(meth)
        owner = meth.owner
        name = meth.name
        (owner.instance_methods + owner.private_instance_methods).uniq.map do |m|
          aliased_method = owner.__send__(:instance_method, m)
          next unless aliased_method == owner.__send__(:instance_method, name)
          next if m == name
          aliased_method
        end.compact!
      end
def aliases ( meth ) owner = meth . owner name = meth . name ( owner . instance_methods + owner . private_instance_methods ) . uniq . map do | m | aliased_method = owner . __send__ ( :instance_method , m ) next unless aliased_method == owner . __send__ ( :instance_method , name ) next if m == name aliased_method end . compact! end
Retrieves aliases of the given method.
Retrieves aliases of the given method .
the aliases of the given method if they exist, otherwise an empty array
the aliases of the given method if they exist otherwise an empty array
Array<UnboundMethod>
meth
meth The method object
meth The method object