Class: Ray::Payloads::TracePayload
- Defined in:
- lib/ray/payloads/trace_payload.rb
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(locations) ⇒ TracePayload
constructor
A new instance of TracePayload.
- #type ⇒ Object
Methods inherited from Payload
Constructor Details
#initialize(locations) ⇒ TracePayload
Returns a new instance of TracePayload.
5 6 7 |
# File 'lib/ray/payloads/trace_payload.rb', line 5 def initialize(locations) @locations = locations end |
Instance Method Details
#content ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ray/payloads/trace_payload.rb', line 13 def content frames = @locations.map do |location| { file_name: location.absolute_path, line_number: location.lineno, vendor_frame: false, } end { frames: frames } end |
#type ⇒ Object
9 10 11 |
# File 'lib/ray/payloads/trace_payload.rb', line 9 def type 'trace' end |