Class: AppMap::Rails::ActionHandler::HTTPServerResponse::Call

Inherits:
Trace::MethodReturnIgnoreValue show all
Defined in:
lib/appmap/rails/action_handler.rb

Constant Summary

Constants inherited from Trace::MethodEvent

Trace::MethodEvent::COUNTER_LOCK, Trace::MethodEvent::LIMIT

Instance Attribute Summary collapse

Attributes inherited from Trace::MethodReturnIgnoreValue

#elapsed, #parent_id

Attributes inherited from Trace::MethodEventStruct

#defined_class, #event, #id, #lineno, #method_id, #path, #static, #thread_id

Instance Method Summary collapse

Methods inherited from Trace::MethodReturnIgnoreValue

build_from_tracepoint

Methods inherited from Trace::MethodEvent

build_from_tracepoint, display_string, next_id, value_in_binding

Constructor Details

#initialize(path, lineno, payload, parent_id, elapsed) ⇒ Call

Returns a new instance of Call.



58
59
60
61
62
63
64
# File 'lib/appmap/rails/action_handler.rb', line 58

def initialize(path, lineno, payload, parent_id, elapsed)
  super AppMap::Trace::MethodEvent.next_id, :return, HTTPServerResponse, :call, path, lineno, false, Thread.current.object_id

  self.payload = payload
  self.parent_id = parent_id
  self.elapsed = elapsed
end

Instance Attribute Details

#payloadObject

Returns the value of attribute payload.



56
57
58
# File 'lib/appmap/rails/action_handler.rb', line 56

def payload
  @payload
end

Instance Method Details

#to_hObject



66
67
68
69
70
71
72
# File 'lib/appmap/rails/action_handler.rb', line 66

def to_h
  super.tap do |h|
    h[:http_server_response] = {
      status: payload[:status]
    }
  end
end