Class: AppMap::Trace::MethodReturn
- Inherits:
-
MethodReturnIgnoreValue
- Object
- Struct
- MethodEventStruct
- MethodEvent
- MethodReturnIgnoreValue
- AppMap::Trace::MethodReturn
- Defined in:
- lib/appmap/trace/tracer.rb
Constant Summary
Constants inherited from MethodEvent
AppMap::Trace::MethodEvent::COUNTER_LOCK, AppMap::Trace::MethodEvent::LIMIT
Instance Attribute Summary collapse
-
#return_value ⇒ Object
Returns the value of attribute return_value.
Attributes inherited from MethodReturnIgnoreValue
Attributes inherited from MethodEventStruct
#defined_class, #event, #id, #lineno, #method_id, #path, #static, #thread_id
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from MethodEvent
display_string, next_id, value_in_binding
Instance Attribute Details
#return_value ⇒ Object
Returns the value of attribute return_value.
182 183 184 |
# File 'lib/appmap/trace/tracer.rb', line 182 def return_value @return_value end |
Class Method Details
.build_from_tracepoint(mr = MethodReturn.new, tp, path, parent_id, elapsed) ⇒ Object
185 186 187 188 189 190 191 192 193 194 |
# File 'lib/appmap/trace/tracer.rb', line 185 def build_from_tracepoint(mr = MethodReturn.new, tp, path, parent_id, elapsed) mr.tap do |_| mr.return_value = { class: tp.return_value.class.name, value: display_string(tp.return_value), object_id: tp.return_value.__id__ } MethodReturnIgnoreValue.build_from_tracepoint(mr, tp, path, parent_id, elapsed) end end |
Instance Method Details
#to_h ⇒ Object
197 198 199 200 201 |
# File 'lib/appmap/trace/tracer.rb', line 197 def to_h super.tap do |h| h[:return_value] = return_value end end |