Class: Taketo::Commands::SSHCommand

Inherits:
Object
  • Object
show all
Includes:
SSHOptions
Defined in:
lib/taketo/commands/ssh_command.rb

Instance Method Summary collapse

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, options = {})
  @server = server
end

Instance Method Details

#programObject



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