class Sentry::Backtrace::Line

Handles backtrace parsing line by line

def self.parse(unparsed_line, in_app_pattern)

Returns:
  • (Line) - The parsed backtrace line

Parameters:
  • unparsed_line (String) -- The raw line from +caller+ or some backtrace
def self.parse(unparsed_line, in_app_pattern)
  ruby_match = unparsed_line.match(RUBY_INPUT_FORMAT)
  if ruby_match
    _, file, number, method = ruby_match.to_a
    file.sub!(/\.class$/, RB_EXTENSION)
    module_name = nil
  else
    java_match = unparsed_line.match(JAVA_INPUT_FORMAT)
    _, module_name, method, file, number = java_match.to_a
  end
  new(file, number, method, module_name, in_app_pattern)
end

def ==(other)

def ==(other)
  to_s == other.to_s
end

def in_app

def in_app
  if file =~ in_app_pattern
    true
  else
    false
  end
end

def initialize(file, number, method, module_name, in_app_pattern)

def initialize(file, number, method, module_name, in_app_pattern)
  @file = file
  @module_name = module_name
  @number = number.to_i
  @method = method
  @in_app_pattern = in_app_pattern
end

def inspect

def inspect
  "<Line:#{self}>"
end

def to_s

Reconstructs the line in a readable fashion
def to_s
  "#{file}:#{number}:in `#{method}'"
end