Class: Aws::Xray::TestSocket

Inherits:
StringIO
  • Object
show all
Defined in:
lib/aws/xray/sockets.rb

Overview

For test

Examples:

io = Aws::Xray::TestSocket
Aws::Xray.config.client_options = { sock: io }
# Sending...
io.rewind
sent_jsons = io.read #=> Sent messages
p sent_jsons.split("\n").map {|j| JSON.parse(j) }

Instance Method Summary collapse

Instance Method Details

#closeObject



17
# File 'lib/aws/xray/sockets.rb', line 17

def close; end

#send(body) ⇒ Object



13
14
15
# File 'lib/aws/xray/sockets.rb', line 13

def send(body, *)
  write(body)
end