Class: AppMap::Event::MethodReturnIgnoreValue

Inherits:
MethodEvent show all
Defined in:
lib/appmap/event.rb

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

Attributes inherited from MethodEventStruct

#event, #id, #thread_id

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

#elapsedObject

Returns the value of attribute elapsed.



265
266
267
# File 'lib/appmap/event.rb', line 265

def elapsed
  @elapsed
end

#elapsed_instrumentationObject

Returns the value of attribute elapsed_instrumentation.



265
266
267
# File 'lib/appmap/event.rb', line 265

def elapsed_instrumentation
  @elapsed_instrumentation
end

#parent_idObject

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_hObject



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