Class: AppMap::Event::MethodReturnIgnoreValue
- Inherits:
-
MethodEvent
- Object
- Struct
- MethodEventStruct
- MethodEvent
- AppMap::Event::MethodReturnIgnoreValue
- Defined in:
- lib/appmap/event.rb
Direct Known Subclasses
MethodReturn, Handler::HTTPClientResponse, Handler::Rails::SQLHandler::SQLReturn
Constant Summary
Constants inherited from MethodEvent
AppMap::Event::MethodEvent::MAX_ARRAY_ENUMERATION, AppMap::Event::MethodEvent::MAX_HASH_ENUMERATION, AppMap::Event::MethodEvent::MAX_STRING_LENGTH
Instance Attribute Summary collapse
-
#elapsed ⇒ Object
Returns the value of attribute elapsed.
-
#elapsed_instrumentation ⇒ Object
Returns the value of attribute elapsed_instrumentation.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
Attributes inherited from MethodEventStruct
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from MethodEvent
add_schema, add_size, best_class_name, custom_display_string, default_display_string, display_string, encode_display_string, #ready?
Instance Attribute Details
#elapsed ⇒ Object
Returns the value of attribute elapsed.
265 266 267 |
# File 'lib/appmap/event.rb', line 265 def elapsed @elapsed end |
#elapsed_instrumentation ⇒ Object
Returns the value of attribute elapsed_instrumentation.
265 266 267 |
# File 'lib/appmap/event.rb', line 265 def elapsed_instrumentation @elapsed_instrumentation end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
265 266 267 |
# File 'lib/appmap/event.rb', line 265 def parent_id @parent_id end |
Class Method Details
.build_from_invocation(parent_id, elapsed: nil, event: MethodReturnIgnoreValue.new) ⇒ Object
268 269 270 271 272 273 274 275 |
# File 'lib/appmap/event.rb', line 268 def build_from_invocation(parent_id, elapsed: nil, event: MethodReturnIgnoreValue.new) event ||= MethodReturnIgnoreValue.new event.tap do |_| event.parent_id = parent_id event.elapsed = elapsed MethodEvent.build_from_invocation(:return, event: event) end end |
Instance Method Details
#to_h ⇒ Object
278 279 280 281 282 283 284 |
# File 'lib/appmap/event.rb', line 278 def to_h super.tap do |h| h[:parent_id] = parent_id h[:elapsed] = elapsed if elapsed h[:elapsed_instrumentation] = elapsed_instrumentation if elapsed_instrumentation end end |