class OneApm::Agent::Threading::BacktraceBase

Attributes

children[R]

Public Class Methods

new() click to toggle source
# File lib/one_apm/support/backtrace/backtrace_node.rb, line 12
def initialize
  @children = []
  @depth    = 0
end

Public Instance Methods

add_child(child) click to toggle source
# File lib/one_apm/support/backtrace/backtrace_node.rb, line 22
def add_child(child)
  child.depth = @depth + 1
  @children << child
end
add_child_unless_present(child) click to toggle source
# File lib/one_apm/support/backtrace/backtrace_node.rb, line 17
def add_child_unless_present(child)
  child.depth = @depth + 1
  @children << child unless @children.include? child
end
find_child(raw_line) click to toggle source
# File lib/one_apm/support/backtrace/backtrace_node.rb, line 27
def find_child(raw_line)
  @children.find { |child| child.raw_line == raw_line }
end