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
30
31
32
33
|
# File 'lib/sshkit/backends/netssh.rb', line 30
def background(*args)
options = args..merge(run_in_background: true)
_execute(*[*args, options]).success?
end
|
#capture(*args) ⇒ Object
35
36
37
38
|
# File 'lib/sshkit/backends/netssh.rb', line 35
def capture(*args)
options = args..merge(verbosity: Logger::DEBUG)
_execute(*[*args, options]).success?
end
|
#config ⇒ Object
44
45
46
|
# File 'lib/sshkit/backends/netssh.rb', line 44
def config
@config ||= Configuration.new
end
|
40
41
42
|
# File 'lib/sshkit/backends/netssh.rb', line 40
def configure
yield config
end
|
#execute(*args) ⇒ Object
26
27
28
|
# File 'lib/sshkit/backends/netssh.rb', line 26
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
22
23
24
|
# File 'lib/sshkit/backends/netssh.rb', line 18
def test(*args)
options = args..merge(
raise_on_non_zero_exit: false,
verbosity: Logger::DEBUG
)
_execute(*[*args, options]).success?
end
|