Class: Mongory::Utils::Debugger::TraceEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/mongory/utils/debugger.rb

Overview

A trace entry representing a single matcher output at a given indentation level.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#levelInteger

Returns the indentation level of this entry.

Returns:

  • (Integer)

    the indentation level of this entry



118
119
120
121
122
# File 'lib/mongory/utils/debugger.rb', line 118

TraceEntry = Struct.new(:text, :level) do
  def formatted
    "#{'  ' * level}#{text}"
  end
end

#textString

Returns the string to be printed.

Returns:

  • (String)

    the string to be printed



118
119
120
121
122
# File 'lib/mongory/utils/debugger.rb', line 118

TraceEntry = Struct.new(:text, :level) do
  def formatted
    "#{'  ' * level}#{text}"
  end
end

Instance Method Details

#formattedObject



119
120
121
# File 'lib/mongory/utils/debugger.rb', line 119

def formatted
  "#{'  ' * level}#{text}"
end