Last active
January 27, 2020 14:52
-
-
Save mkldon/a72dfed79269a75e3643c7c0d2c9ebb6 to your computer and use it in GitHub Desktop.
Excon print socket data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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