Class: SSHKit::Backend::Netssh
Instance Attribute Summary
Attributes inherited from Abstract
#host
Instance Method Summary
collapse
#make, #rake
Methods inherited from Abstract
#as, #initialize, #make, #rake, #with, #within
Instance Method Details
#background(*args) ⇒ Object
23
24
25
26
|
# File 'lib/sshkit/backends/netssh.rb', line 23
def background(*args)
options = args..merge(run_in_background: true)
_execute(*[*args, options]).success?
end
|
#capture(*args) ⇒ Object
28
29
30
|
# File 'lib/sshkit/backends/netssh.rb', line 28
def capture(*args)
_execute(*args).stdout.strip
end
|
#execute(*args) ⇒ Object
19
20
21
|
# File 'lib/sshkit/backends/netssh.rb', line 19
def execute(*args)
_execute(*args).success?
end
|
#run ⇒ Object
10
11
12
|
# File 'lib/sshkit/backends/netssh.rb', line 10
def run
instance_exec(host, &@block)
end
|
#test(*args) ⇒ Object
14
15
16
17
|
# File 'lib/sshkit/backends/netssh.rb', line 14
def test(*args)
options = args..merge(raise_on_non_zero_exit: false)
_execute(*[*args, options]).success?
end
|