Method: Pry::Method.singleton_class_of

Defined in:
lib/pry/method.rb

.singleton_class_of(obj) ⇒ Object



247
248
249
250
251
# File 'lib/pry/method.rb', line 247

def singleton_class_of(obj)
  class << obj; self; end
rescue TypeError # can't define singleton. Fixnum, Symbol, Float, ...
  obj.class
end