Class: Bcome::Ssh::TunnelKeeper
- Inherits:
-
Object
- Object
- Bcome::Ssh::TunnelKeeper
- Includes:
- Singleton
- Defined in:
- lib/objects/ssh/tunnel_keeper.rb
Instance Method Summary collapse
- #<<(tunnel) ⇒ Object
- #close_tunnels ⇒ Object
-
#initialize ⇒ TunnelKeeper
constructor
A new instance of TunnelKeeper.
Constructor Details
#initialize ⇒ TunnelKeeper
Returns a new instance of TunnelKeeper.
8 9 10 |
# File 'lib/objects/ssh/tunnel_keeper.rb', line 8 def initialize @tunnels = [] end |
Instance Method Details
#<<(tunnel) ⇒ Object
12 13 14 |
# File 'lib/objects/ssh/tunnel_keeper.rb', line 12 def <<(tunnel) @tunnels << tunnel end |
#close_tunnels ⇒ Object
16 17 18 |
# File 'lib/objects/ssh/tunnel_keeper.rb', line 16 def close_tunnels @tunnels.each(&:close!) end |