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:
parent
f1f54d2ecb
commit
3d3cf14d3b
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue