struct Backtracer::Backtrace::Frame
- Backtracer::Backtrace::Frame
- Struct
- Value
- Object
Overview
An object representation of a stack frame.
Defined in:
backtracer/backtrace/frame.crConstructors
Instance Method Summary
- #==(other : self)
- #absolute_path : String | Nil
-
#column : Int32 | Nil
The column number of this frame.
- #context(context_lines : Int32 | Nil = nil) : Tuple(Array(String), String, Array(String)) | Nil
- #context_hash(context_lines : Int32 | Nil = nil) : Hash(Int32, String) | Nil
-
#hash(hasher)
See
Object#hash(hasher)
- #in_app? : Bool
-
#inspect(io : IO) : Nil
Appends this struct's name and instance variables names and values to the given IO.
-
#lineno : Int32 | Nil
The line number of this frame.
-
#method : String
The method of this frame (such as
User.find
). -
#path : String | Nil
The file name of this frame (such as
app/models/user.cr
). - #relative_path : String | Nil
- #shard_name : String | Nil
-
#to_s(io : IO) : Nil
Reconstructs the frame in a readable fashion
- #under_src_path? : Bool
Constructor Detail
def self.new(method : String, path : Nil | String = nil, lineno : Int32 | Nil = nil, column : Int32 | Nil = nil, *, configuration : Nil | Backtracer::Configuration = nil)
#
Instance Method Detail
def context(context_lines : Int32 | Nil = nil) : Tuple(Array(String), String, Array(String)) | Nil
#
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)"