Skip to content

Instantly share code, notes, and snippets.

@mkldon
Last active January 27, 2020 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkldon/a72dfed79269a75e3643c7c0d2c9ebb6 to your computer and use it in GitHub Desktop.
Save mkldon/a72dfed79269a75e3643c7c0d2c9ebb6 to your computer and use it in GitHub Desktop.
Excon print socket data
module ExconSocketDebug
def write(data)
puts data
super
end
def read(*args)
super.tap { |data| puts data }
end
def readline
super.tap { |data| puts data }
end
def legacy_readline
super.tap { |data| puts data }
end
end
Excon::Socket.prepend ExconSocketDebug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment