class InfluxReporter::ErrorMessage::Stacktrace

Attributes

frames[R]

Public Class Methods

from(config, exception) click to toggle source
# File lib/influx_reporter/error_message/stacktrace.rb, line 13
def self.from(config, exception)
  return unless exception.backtrace

  new(config, exception.backtrace.reverse.map do |line|
    Frame.from_line config, line
  end)
end
new(config, frames) click to toggle source
# File lib/influx_reporter/error_message/stacktrace.rb, line 6
def initialize(config, frames)
  @config = config
  @frames = frames
end

Public Instance Methods

to_h() click to toggle source
# File lib/influx_reporter/error_message/stacktrace.rb, line 21
def to_h
  { frames: frames.map(&:to_h) }
end