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

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

Constant Summary

Constants inherited from Event::MethodEvent

Event::MethodEvent::LIMIT

Instance Attribute Summary collapse

Attributes inherited from Event::MethodReturnIgnoreValue

#elapsed, #parent_id

Attributes inherited from Event::MethodEventStruct

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

Instance Method Summary collapse

Methods inherited from Event::MethodReturnIgnoreValue

build_from_invocation

Methods inherited from Event::MethodEvent

build_from_invocation, display_string

Constructor Details

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

Returns a new instance of Call.



62
63
64
65
66
67
68
# File 'lib/appmap/rails/action_handler.rb', line 62

def initialize(path, lineno, payload, parent_id, elapsed)
  super AppMap::Event.next_id_counter, :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.



60
61
62
# File 'lib/appmap/rails/action_handler.rb', line 60

def payload
  @payload
end

Instance Method Details

#to_hObject



70
71
72
73
74
75
76
# File 'lib/appmap/rails/action_handler.rb', line 70

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