class Taketo::Commands::MoshCommand

Public Class Methods

new(server, options = {}) click to toggle source
# File lib/taketo/commands/mosh_command.rb, line 7
def initialize(server, options = {})
  @server = server
end

Public Instance Methods

program() click to toggle source
# File lib/taketo/commands/mosh_command.rb, line 15
def program
  "MOSH_TITLE_NOPREFIX=1 mosh --no-init"
end
remote_shell_program() click to toggle source
# File lib/taketo/commands/mosh_command.rb, line 23
def remote_shell_program
  "/bin/sh -c"
end
render(rendered_command) click to toggle source
# File lib/taketo/commands/mosh_command.rb, line 11
def render(rendered_command)
  %Q[#{program} #{ssh_program} -- #{username}#{host} #{remote_shell_program} "#{rendered_command}"].squeeze(" ")
end
ssh_program() click to toggle source
# File lib/taketo/commands/mosh_command.rb, line 19
def ssh_program
  %Q[--ssh="ssh #{port} #{identity_file}"].squeeze(" ") if @server.port || @server.identity_file
end