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



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

def close; end

#send(body) ⇒ Object



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

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