Class: AppMap::Rails::ActionHandler::HTTPServerRequest::Call
- Inherits:
-
Event::MethodCall
- Object
- Struct
- Event::MethodEventStruct
- Event::MethodEvent
- Event::MethodCall
- AppMap::Rails::ActionHandler::HTTPServerRequest::Call
- Defined in:
- lib/appmap/rails/action_handler.rb
Constant Summary
Constants inherited from Event::MethodEvent
Instance Attribute Summary collapse
-
#payload ⇒ Object
Returns the value of attribute payload.
Attributes inherited from Event::MethodCall
#defined_class, #lineno, #method_id, #parameters, #path, #receiver, #static
Attributes inherited from Event::MethodEventStruct
Instance Method Summary collapse
-
#initialize(payload) ⇒ Call
constructor
A new instance of Call.
- #to_h ⇒ Object
Methods inherited from Event::MethodCall
Methods inherited from Event::MethodEvent
build_from_invocation, display_string
Constructor Details
#initialize(payload) ⇒ Call
22 23 24 25 26 |
# File 'lib/appmap/rails/action_handler.rb', line 22 def initialize(payload) super AppMap::Event.next_id_counter, :call, Thread.current.object_id self.payload = payload end |
Instance Attribute Details
#payload ⇒ Object
Returns the value of attribute payload.
20 21 22 |
# File 'lib/appmap/rails/action_handler.rb', line 20 def payload @payload end |
Instance Method Details
#to_h ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/appmap/rails/action_handler.rb', line 28 def to_h super.tap do |h| h[:http_server_request] = { request_method: payload[:method], path_info: payload[:path] } params = payload[:params] h[:message] = params.keys.map do |key| val = params[key] { name: key, class: val.class.name, value: self.class.display_string(val), object_id: val.__id__ } end end end |