Module: TraceViz::Formatters::Helpers::ResultHelper

Included in:
TraceDataFormatter
Defined in:
lib/trace_viz/formatters/helpers/result_helper.rb

Instance Method Summary collapse

Instance Method Details

#result_representation(trace_data) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/trace_viz/formatters/helpers/result_helper.rb', line 9

def result_representation(trace_data)
  return unless config.result[:show]

  truncated_result = Utils::Format::ValueTruncator.truncate(
    trace_data.result.inspect,
    length: config.result[:truncate_value],
  )

  "#=> #{truncated_result}"
end