Module: TraceViz::Formatters::Helpers::Log::ResultHelper
- Included in:
- Log::MethodCallFormatter, Log::MethodReturnFormatter
- Defined in:
- lib/trace_viz/formatters/helpers/log/result_helper.rb
Instance Method Summary collapse
Instance Method Details
#format_result(trace_data, config) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/trace_viz/formatters/helpers/log/result_helper.rb', line 10 def format_result(trace_data, config) return unless config.result[:show] truncated_result = Utils::Format::ValueTruncator.truncate( trace_data.result.inspect, length: config.result[:truncate_value], ) prefix = colorize_for("#=>", :trace_result_prefix) result = colorize_for(truncated_result, :trace_result_value) [prefix, result].join(" ") end |