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
|
Defined in: | rspec-expectations/lib/rspec/matchers/composable.rb |
Overview
Wraps an item in order to surface its description
via #inspect.
Instance Attribute Summary
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.
# File 'rspec-expectations/lib/rspec/matchers/composable.rb', line 158
DescribableItem = Struct.new(:item)
Instance Method Details
#inspect
Inspectable version of the item description
# 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.
# File 'rspec-expectations/lib/rspec/matchers/composable.rb', line 165
def pretty_print(pp) pp.text "(#{item.description})" end