Method: Pry::Method.resolution_order
- Defined in:
- lib/pry/method.rb
.resolution_order(obj) ⇒ Array[Class, Module]
Get every Class and Module, in order, that will be checked when looking for an instance method to call on this object.
192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/pry/method.rb', line 192 def resolution_order(obj) if Class === obj # rubocop:disable Style/CaseEquality singleton_class_resolution_order(obj) + instance_resolution_order(Class) else klass = begin singleton_class_of(obj) rescue StandardError obj.class end instance_resolution_order(klass) end end |