Class: RSpec::Matchers::Composable::DescribableItem Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/composable.rb

Overview

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.

Wraps an item in order to surface its ‘description` via `inspect`.

Instance Method Summary collapse

Methods inherited from Struct

#as_json

Instance Method Details

#inspectObject

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.

Inspectable version of the item description



160
161
162
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/composable.rb', line 160

def inspect
  "(#{item.description})"
end

#pretty_print(pp) ⇒ 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.

A pretty printed version of the item description.



165
166
167
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/matchers/composable.rb', line 165

def pretty_print(pp)
  pp.text "(#{item.description})"
end