Class: ObjectInspector::CombiningFormatter

Inherits:
BaseFormatter show all
Defined in:
lib/object_inspector/formatters/combining_formatter.rb

Overview

ObjectInspector::CombiningFormatter implements BaseFormatter to return the standard/default inspect output format by combining Strings.

Constant Summary

Constants inherited from BaseFormatter

BaseFormatter::RIGHT_ARROW_ICON

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseFormatter

#flags, #identification, #info, #initialize, #name, #wrapped_object_inspection

Constructor Details

This class inherits a constructor from ObjectInspector::BaseFormatter

Instance Attribute Details

#inspectorObjectInspector::Inspector

Returns the current value of inspector.

Returns:



7
8
9
# File 'lib/object_inspector/formatters/combining_formatter.rb', line 7

def inspector
  @inspector
end

Instance Method Details

#callString

Perform the formatting routine.

Returns:

  • (String)


11
12
13
14
15
16
17
# File 'lib/object_inspector/formatters/combining_formatter.rb', line 11

def call
  if wrapped_object_inspection
    build_wrapped_object_string
  else
    build_string
  end
end