Module: SSHClient
- Defined in:
- lib/ssh_client.rb,
lib/ssh_client/version.rb,
lib/ssh_client/connection.rb,
lib/ssh_client/config_item.rb,
lib/ssh_client/transport/base.rb,
lib/ssh_client/command_builder.rb,
lib/ssh_client/transport/net_ssh.rb
Defined Under Namespace
Modules: Transport
Classes: CommandBuilder, ConfigItem, Connection
Constant Summary
collapse
- CommandExitWithError =
Class.new(StandardError)
- VERSION =
"0.1.2"
Class Method Summary
collapse
Class Method Details
.close ⇒ Object
24
25
26
|
# File 'lib/ssh_client.rb', line 24
def self.close
@current_connection.close
end
|
.config(name = nil) ⇒ Object
15
16
17
18
|
# File 'lib/ssh_client.rb', line 15
def self.config(name = nil)
@configurations ||= Hash.new
@configurations[name] ||= ConfigItem.new name
end
|
11
12
13
|
# File 'lib/ssh_client.rb', line 11
def self.configure(name = nil)
yield config(name)
end
|
.connect(*args, &blk) ⇒ Object
20
21
22
|
# File 'lib/ssh_client.rb', line 20
def self.connect(*args, &blk)
@current_connection = Connection.new(*args, &blk)
end
|