Module: RubySSH
- Defined in:
- lib/ruby-ssh.rb,
lib/ruby-ssh/result.rb,
lib/ruby-ssh/version.rb,
lib/ruby-ssh/shell_runner.rb
Defined Under Namespace
Classes: Result, ShellRunner
Constant Summary collapse
- VERSION =
"0.1.3"
Class Method Summary collapse
Class Method Details
.run(host, user, options = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ruby-ssh.rb', line 15 def run(host, user, = {}) script = .delete(:script) result = nil # TODO 明示的に初期化したくない Net::SSH.start(host, user, ) do |ssh| ssh.shell_runner do |runner| result = runner.exec(script) end end result end |