struct Backtracer::Backtrace::Frame

Overview

An object representation of a stack frame.

Defined in:

backtracer/backtrace/frame.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(method : String, path : Nil | String = nil, lineno : Int32 | Nil = nil, column : Int32 | Nil = nil, *, configuration : Nil | Backtracer::Configuration = nil) #

[View source]

Instance Method Detail

def ==(other : self) #

def absolute_path : String | Nil #

[View source]
def column : Int32 | Nil #

The column number of this frame.


[View source]
def context(context_lines : Int32 | Nil = nil) : Tuple(Array(String), String, Array(String)) | Nil #

[View source]
def context_hash(context_lines : Int32 | Nil = nil) : Hash(Int32, String) | Nil #

[View source]
def hash(hasher) #
Description copied from struct Struct

See Object#hash(hasher)


def in_app? : Bool #

[View source]
def inspect(io : IO) : Nil #
Description copied from struct Struct

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)"

[View source]
def lineno : Int32 | Nil #

The line number of this frame.


[View source]
def method : String #

The method of this frame (such as User.find).


[View source]
def path : String | Nil #

The file name of this frame (such as app/models/user.cr).


[View source]
def relative_path : String | Nil #

[View source]
def shard_name : String | Nil #

[View source]
def to_s(io : IO) : Nil #

Reconstructs the frame in a readable fashion


[View source]
def under_src_path? : Bool #

[View source]