Class: RSpec::Support::ObjectFormatter::InspectableItem Private

Inherits:
Struct
  • Object
show all
Defined in:
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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



107
108
109
# File 'lib/rspec/support/object_formatter.rb', line 107

def text
  @text
end

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.



108
109
110
# File 'lib/rspec/support/object_formatter.rb', line 108

def inspect
  text
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.



112
113
114
# File 'lib/rspec/support/object_formatter.rb', line 112

def pretty_print(pp)
  pp.text(text)
end