Class: SSHKit::Backend::Netssh
Defined Under Namespace
Classes: Configuration
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
27
28
29
30
|
# File 'lib/sshkit/backends/netssh.rb', line 27
def background(*args)
options = args..merge(run_in_background: true)
_execute(*[*args, options]).success?
end
|
#capture(*args) ⇒ Object
32
33
34
|
# File 'lib/sshkit/backends/netssh.rb', line 32
def capture(*args)
_execute(*args).stdout.strip
end
|
#config ⇒ Object
40
41
42
|
# File 'lib/sshkit/backends/netssh.rb', line 40
def config
@config ||= Configuration.new
end
|
36
37
38
|
# File 'lib/sshkit/backends/netssh.rb', line 36
def configure
yield config
end
|
#execute(*args) ⇒ Object
23
24
25
|
# File 'lib/sshkit/backends/netssh.rb', line 23
def execute(*args)
_execute(*args).success?
end
|
#run ⇒ Object
14
15
16
|
# File 'lib/sshkit/backends/netssh.rb', line 14
def run
instance_exec(host, &@block)
end
|
#test(*args) ⇒ Object
18
19
20
21
|
# File 'lib/sshkit/backends/netssh.rb', line 18
def test(*args)
options = args..merge(raise_on_non_zero_exit: false)
_execute(*[*args, options]).success?
end
|