Class: RailsTracepointStack::Trace
- Inherits:
-
Object
- Object
- RailsTracepointStack::Trace
- Extended by:
- Forwardable
- Defined in:
- lib/rails_tracepoint_stack/trace.rb
Instance Attribute Summary collapse
-
#depth ⇒ Object
Returns the value of attribute depth.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#trace_point ⇒ Object
readonly
Returns the value of attribute trace_point.
Instance Method Summary collapse
- #exception ⇒ Object
-
#initialize(trace_point:) ⇒ Trace
constructor
A new instance of Trace.
- #kind ⇒ Object
- #return_value ⇒ Object
Constructor Details
#initialize(trace_point:) ⇒ Trace
Returns a new instance of Trace.
15 16 17 |
# File 'lib/rails_tracepoint_stack/trace.rb', line 15 def initialize(trace_point:) @trace_point = trace_point end |
Instance Attribute Details
#depth ⇒ Object
Returns the value of attribute depth.
8 9 10 |
# File 'lib/rails_tracepoint_stack/trace.rb', line 8 def depth @depth end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/rails_tracepoint_stack/trace.rb', line 7 def params @params end |
#trace_point ⇒ Object (readonly)
Returns the value of attribute trace_point.
7 8 9 |
# File 'lib/rails_tracepoint_stack/trace.rb', line 7 def trace_point @trace_point end |
Instance Method Details
#exception ⇒ Object
35 36 37 38 39 |
# File 'lib/rails_tracepoint_stack/trace.rb', line 35 def exception return nil unless kind == :raise trace_point.raised_exception end |
#kind ⇒ Object
19 20 21 |
# File 'lib/rails_tracepoint_stack/trace.rb', line 19 def kind trace_point.event end |
#return_value ⇒ Object
29 30 31 32 33 |
# File 'lib/rails_tracepoint_stack/trace.rb', line 29 def return_value return nil unless kind == :return trace_point.return_value end |