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

Refactor lib/pry/method.rb(Pry::Method.all_from_obj).

This commit is contained in:
yui-knk 2013-12-23 01:23:22 +09:00
parent 5ed220b467
commit 45c38d6b9c

View file

@ -154,7 +154,7 @@ class Pry
# @param [Boolean] include_super Whether to include methods from ancestors.
# @return [Array[Pry::Method]]
def all_from_obj(obj, include_super=true)
all_from_class(class << obj; self; end, include_super)
all_from_class(singleton_class_of(obj), include_super)
end
# Get every `Class` and `Module`, in order, that will be checked when looking