123456789_123456789_123456789_123456789_123456789_

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

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
  • Object
Defined in: rspec-expectations/lib/rspec/matchers/composable.rb

Overview

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

Instance Attribute Summary

  • #item rw private Internal use only

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

Instance Method Summary

  • #inspect Internal use only

    Inspectable version of the item description.

  • #pretty_print(pp) Internal use only

    A pretty printed version of the item description.

Instance Attribute Details

#item (rw, private)

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

[ GitHub ]

  
# File 'rspec-expectations/lib/rspec/matchers/composable.rb', line 158

DescribableItem = Struct.new(:item)

Instance Method Details

#inspect

Inspectable version of the item description

[ GitHub ]

  
# File 'rspec-expectations/lib/rspec/matchers/composable.rb', line 160

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

#pretty_print(pp)

A pretty printed version of the item description.

[ GitHub ]

  
# File 'rspec-expectations/lib/rspec/matchers/composable.rb', line 165

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