class RSpec::Support::ObjectFormatter::UninspectableObjectInspector
Constants
- OBJECT_ID_FORMAT
Public Class Methods
can_inspect?(object)
click to toggle source
# File lib/rspec/support/object_formatter.rb, line 190 def self.can_inspect?(object) object.inspect false rescue NoMethodError true end
Public Instance Methods
inspect()
click to toggle source
# File lib/rspec/support/object_formatter.rb, line 197 def inspect "#<#{klass}:#{native_object_id}>" end
klass()
click to toggle source
# File lib/rspec/support/object_formatter.rb, line 201 def klass Support.class_of(object) end
native_object_id()
click to toggle source
# File lib/rspec/support/object_formatter.rb, line 206 def native_object_id OBJECT_ID_FORMAT % (object.__id__ << 1) rescue NoMethodError # In Ruby 1.9.2, BasicObject responds to none of #__id__, #object_id, #id... '-' end