Class: RSpec::Support::ObjectFormatter::UninspectableObjectInspector Private
- Inherits:
-
BaseInspector
- Object
- Struct
- BaseInspector
- RSpec::Support::ObjectFormatter::UninspectableObjectInspector
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/object_formatter.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- OBJECT_ID_FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'%#016x'
Instance Attribute Summary
Attributes inherited from BaseInspector
Class Method Summary collapse
- .can_inspect?(object) ⇒ Boolean private
Instance Method Summary collapse
- #inspect ⇒ Object private
- #klass ⇒ Object private
- #native_object_id ⇒ Object private
Methods inherited from BaseInspector
Methods inherited from Struct
Class Method Details
.can_inspect?(object) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
198 199 200 201 202 203 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/object_formatter.rb', line 198 def self.can_inspect?(object) object.inspect false rescue NoMethodError true end |
Instance Method Details
#inspect ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
205 206 207 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/object_formatter.rb', line 205 def inspect "#<#{klass}:#{native_object_id}>" end |
#klass ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
209 210 211 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/object_formatter.rb', line 209 def klass Support.class_of(object) end |
#native_object_id ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
214 215 216 217 218 219 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.12.0/lib/rspec/support/object_formatter.rb', line 214 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 |