Class: RailsOrbit::Backtrace::Frame
- Inherits:
-
Struct
- Object
- Struct
- RailsOrbit::Backtrace::Frame
- Defined in:
- lib/rails_orbit/backtrace.rb
Overview
A single backtrace frame. ‘parsed?` is false for lines we could not parse (kept verbatim in `raw` so nothing is silently dropped).
Instance Attribute Summary collapse
-
#application ⇒ Object
Returns the value of attribute application.
-
#file ⇒ Object
Returns the value of attribute file.
-
#line ⇒ Object
Returns the value of attribute line.
-
#method_name ⇒ Object
Returns the value of attribute method_name.
-
#raw ⇒ Object
Returns the value of attribute raw.
Instance Method Summary collapse
Instance Attribute Details
#application ⇒ Object
Returns the value of attribute application
18 19 20 |
# File 'lib/rails_orbit/backtrace.rb', line 18 def application @application end |
#file ⇒ Object
Returns the value of attribute file
18 19 20 |
# File 'lib/rails_orbit/backtrace.rb', line 18 def file @file end |
#line ⇒ Object
Returns the value of attribute line
18 19 20 |
# File 'lib/rails_orbit/backtrace.rb', line 18 def line @line end |
#method_name ⇒ Object
Returns the value of attribute method_name
18 19 20 |
# File 'lib/rails_orbit/backtrace.rb', line 18 def method_name @method_name end |
#raw ⇒ Object
Returns the value of attribute raw
18 19 20 |
# File 'lib/rails_orbit/backtrace.rb', line 18 def raw @raw end |
Instance Method Details
#application? ⇒ Boolean
19 20 21 |
# File 'lib/rails_orbit/backtrace.rb', line 19 def application? application end |
#display_path ⇒ Object
27 28 29 30 31 |
# File 'lib/rails_orbit/backtrace.rb', line 27 def display_path return raw unless parsed? application ? Backtrace.relative_to_app(file) : Backtrace.shorten_gem(file) end |
#parsed? ⇒ Boolean
23 24 25 |
# File 'lib/rails_orbit/backtrace.rb', line 23 def parsed? !file.nil? end |
#to_s ⇒ Object
33 34 35 36 37 38 |
# File 'lib/rails_orbit/backtrace.rb', line 33 def to_s return raw unless parsed? suffix = method_name ? " in #{method_name}" : "" "#{display_path}:#{line}#{suffix}" end |