lib/pry-doc/pry_ext/method_info.rb
##
# Retrieve the YARD object that contains the method data.
#
# @param [Method, UnboundMethod] meth The method object
# @return [YARD::CodeObjects::MethodObject] the YARD data for the method
Retrieve the YARD object that contains the method data.
Retrieve the YARD object that contains the method data .
def registry_lookup(meth)
        if (obj = YARD::Registry.at(receiver_notation_for(meth)))
          return obj
        end
        if (aliases = aliases(meth)).any?
          YARD::Registry.at(receiver_notation_for(aliases.first))
        elsif meth.owner == Kernel
          YARD::Registry.at("Kernel##{meth.name}") ||
            YARD::Registry.at("Object##{meth.name}")
        end
      end
def registry_lookup ( meth ) if ( obj = YARD :: Registry . at ( receiver_notation_for ( meth ) ) ) return obj end if ( aliases = aliases ( meth ) ) . any? YARD :: Registry . at ( receiver_notation_for ( aliases . first ) ) elsif meth . owner == Kernel YARD :: Registry . at ( "Kernel##{meth.name}" ) || YARD :: Registry . at ( "Object##{meth.name}" ) end end
Retrieve the YARD object that contains the method data.
Retrieve the YARD object that contains the method data .
# YARD thinks that some methods are on Object when # they're actually on Kernel; so try again on Object if Kernel fails.
the YARD data for the method
the YARD data for the method
YARD::CodeObjects::MethodObject
meth
meth The method object
meth The method object