Class: Ray::Payloads::CallerPayload

Inherits:
Payload
  • Object
show all
Defined in:
lib/ray/payloads/caller_payload.rb

Instance Method Summary collapse

Methods inherited from Payload

#get_origin, #to_hash

Constructor Details

#initialize(location) ⇒ CallerPayload

Returns a new instance of CallerPayload.



5
6
7
# File 'lib/ray/payloads/caller_payload.rb', line 5

def initialize(location)
  @location = location
end

Instance Method Details

#contentObject



13
14
15
16
17
18
19
20
21
# File 'lib/ray/payloads/caller_payload.rb', line 13

def content
  {
    frame: {
      file_name: @location.absolute_path,
      line_number: @location.lineno,
      vendor_frame: false,
    }
  }
end

#typeObject



9
10
11
# File 'lib/ray/payloads/caller_payload.rb', line 9

def type
  'caller'
end