Class: Taketo::Commands::SSHCommand
- Inherits:
-
Object
- Object
- Taketo::Commands::SSHCommand
- Includes:
- SSHOptions
- Defined in:
- lib/taketo/commands/ssh_command.rb
Instance Method Summary collapse
-
#initialize(server, options = {}) ⇒ SSHCommand
constructor
A new instance of SSHCommand.
- #program ⇒ Object
- #render(rendered_command) ⇒ Object
Methods included from SSHOptions
#host, #identity_file, #port, #username
Constructor Details
#initialize(server, options = {}) ⇒ SSHCommand
Returns a new instance of SSHCommand.
7 8 9 |
# File 'lib/taketo/commands/ssh_command.rb', line 7 def initialize(server, = {}) @server = server end |
Instance Method Details
#program ⇒ Object
15 16 17 |
# File 'lib/taketo/commands/ssh_command.rb', line 15 def program "ssh -t" end |
#render(rendered_command) ⇒ Object
11 12 13 |
# File 'lib/taketo/commands/ssh_command.rb', line 11 def render(rendered_command) %Q[#{program} #{port} #{identity_file} #{username}#{host} "#{rendered_command}"].squeeze(" ") end |