Method: Pry::Method.instance_resolution_order
- Defined in:
- lib/pry/method.rb
.instance_resolution_order(klass) ⇒ Array[Class, Module]
Get every ‘Class` and `Module`, in order, that will be checked when looking for methods on instances of the given `Class` or `Module`. This does not treat singleton classes of classes specially.
210 211 212 213 |
# File 'lib/pry/method.rb', line 210 def instance_resolution_order(klass) # include klass in case it is a singleton class, ([klass] + Pry::Method.safe_send(klass, :ancestors)).uniq end |