Class: RSpec::Support::ObjectFormatter::BaseInspector 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

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#formatterObject

Returns the value of attribute formatter

Returns:

  • (Object)

    the current value of formatter



125
126
127
# File 'lib/rspec/support/object_formatter.rb', line 125

def formatter
  @formatter
end

#objectObject

Returns the value of attribute object

Returns:

  • (Object)

    the current value of object



125
126
127
# File 'lib/rspec/support/object_formatter.rb', line 125

def object
  @object
end

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.

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


126
127
128
# File 'lib/rspec/support/object_formatter.rb', line 126

def self.can_inspect?(_object)
  raise NotImplementedError
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.

Raises:

  • (NotImplementedError)


130
131
132
# File 'lib/rspec/support/object_formatter.rb', line 130

def inspect
  raise NotImplementedError
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.



134
135
136
# File 'lib/rspec/support/object_formatter.rb', line 134

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