Class: SSHCommand
- Inherits:
-
GenericCommand
- Object
- GenericCommand
- SSHCommand
- Defined in:
- lib/CommandManager.rb
Overview
Executes commands in a remote machine ussing ssh. See documentation for GenericCommand
Direct Known Subclasses
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
Attributes inherited from GenericCommand
#code, #command, #stderr, #stdout
Class Method Summary collapse
-
.run(command, host, logger = nil, stdin = nil) ⇒ Object
Creates a command and runs it.
Instance Method Summary collapse
-
#initialize(command, host, logger = nil, stdin = nil) ⇒ SSHCommand
constructor
This one takes another parameter.
Methods inherited from GenericCommand
#get_error_message, #log, #run
Constructor Details
#initialize(command, host, logger = nil, stdin = nil) ⇒ SSHCommand
This one takes another parameter. host
is the machine where the command is going to be executed
145 146 147 148 |
# File 'lib/CommandManager.rb', line 145 def initialize(command, host, logger=nil, stdin=nil) @host=host super(command, logger, stdin) end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
134 135 136 |
# File 'lib/CommandManager.rb', line 134 def host @host end |
Class Method Details
.run(command, host, logger = nil, stdin = nil) ⇒ Object
Creates a command and runs it
137 138 139 140 141 |
# File 'lib/CommandManager.rb', line 137 def self.run(command, host, logger=nil, stdin=nil) cmd=self.new(command, host, logger, stdin) cmd.run cmd end |