diff options
author | Jamis Buck <jamis@37signals.com> | 2008-03-29 13:21:20 -0600 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2008-03-29 13:21:20 -0600 |
commit | b8989002c4679193a6c385ea28a5ca89ca7675f9 (patch) | |
tree | ebc95d286072dc5a2d64df6523b240791b64cef0 /lib/net/ssh/multi | |
parent | 606a0a2092c2b605d03722efb14cb9039bb8dcb8 (diff) | |
download | net-ssh-multi-b8989002c4679193a6c385ea28a5ca89ca7675f9.tar.gz |
add a custom #inspect method to avoid inspection overload when the SSH session gets inspected
Diffstat (limited to 'lib/net/ssh/multi')
-rw-r--r-- | lib/net/ssh/multi/server.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/net/ssh/multi/server.rb b/lib/net/ssh/multi/server.rb index e6f337b..c3eae2e 100644 --- a/lib/net/ssh/multi/server.rb +++ b/lib/net/ssh/multi/server.rb @@ -38,6 +38,10 @@ module Net; module SSH; module Multi end end + def inspect + @inspect ||= "#<%s:0x%x %s>" % [self.class.name, object_id, to_s] + end + def session(ensure_open=false) return @session if @session || !ensure_open @session ||= begin |