1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

update documentation for from_obj and from_class in Pry::Method

This commit is contained in:
John Mair 2012-11-02 14:46:01 +01:00
parent f1f54d2ecb
commit 3d3cf14d3b

View file

@ -133,6 +133,7 @@ class Pry
#
# @param [Class, Module] klass
# @param [String] name
# @param [Binding] target The binding where the method is looked up.
# @return [Pry::Method, nil]
def from_class(klass, name, target=TOPLEVEL_BINDING)
new(lookup_method_via_binding(klass, name, :instance_method, target)) rescue nil
@ -145,6 +146,7 @@ class Pry
#
# @param [Object] obj
# @param [String] name
# @param [Binding] target The binding where the method is looked up.
# @return [Pry::Method, nil]
def from_obj(obj, name, target=TOPLEVEL_BINDING)
new(lookup_method_via_binding(obj, name, :method, target)) rescue nil