Backtracer::Backtrace::Frame
An object representation of a stack frame.
Constructors
Instance methods
Returns:
pathas is, if it's absolute - i.e. starts with/pathappended toconfiguration.src_pathnilotherwise
See Configuration#src_path
Returns Context record consisting of 3 elements - an array of context lines
before the lineno, line at lineno, and an array of context lines
after the lineno. In case of failure it returns nil.
Amount of returned context lines is taken from the context_lines
argument if given, or configuration.context_lines otherwise.
NOTE: amount of returned context lines might be lower than given
in cases where lineno is near the start or the end of the file.
See Configuration#context_lines
See Object#hash(hasher)
Returns true if this frame originated from the app source code,
false otherwise.
See Configuration#app_dirs_pattern
Appends this struct's name and instance variables names and values to the given IO.
struct Point
def initialize(@x : Int32, @y : Int32)
end
end
p1 = Point.new 1, 2
p1.to_s # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"
Returns:
pathas is, unless it's absolute - i.e. starts with/pathrelative toconfiguration.src_pathwhenunder_src_path?istruenilotherwise
NOTE: returned path is not required to be under_src_path? - see point no. 1
See Configuration#src_path
Returns name of the shard from which this frame originated.
See Configuration#modules_path_pattern
Returns true if path of this frame is within
the configuration.src_path, false otherwise.
See Configuration#src_path