Class: Net::SSH::Telnet::TinyFactory
- Inherits:
-
Object
- Object
- Net::SSH::Telnet::TinyFactory
- Defined in:
- lib/net/ssh/telnet.rb
Overview
Wrapper to emulate the behaviour of Net::Telnet “Proxy” option, where the user passes in an already-open socket
Instance Method Summary collapse
-
#initialize(sock) ⇒ TinyFactory
constructor
A new instance of TinyFactory.
- #open(host, port) ⇒ Object
Constructor Details
#initialize(sock) ⇒ TinyFactory
Returns a new instance of TinyFactory.
24 25 26 |
# File 'lib/net/ssh/telnet.rb', line 24 def initialize(sock) @sock = sock end |
Instance Method Details
#open(host, port) ⇒ Object
27 28 29 30 31 |
# File 'lib/net/ssh/telnet.rb', line 27 def open(host, port) s = @sock @sock = nil s end |