Module: Taketo::Commands::SSHOptions
- Includes:
- Shellwords
- Included in:
- MoshCommand, SSHCommand
- Defined in:
- lib/taketo/commands/ssh_options.rb
Instance Method Summary collapse
- #host ⇒ Object
- #identity_file ⇒ Object
- #initialize(server) ⇒ Object
- #port ⇒ Object
- #username ⇒ Object
Instance Method Details
#host ⇒ Object
13 14 15 |
# File 'lib/taketo/commands/ssh_options.rb', line 13 def host shellescape @server.host end |
#identity_file ⇒ Object
25 26 27 |
# File 'lib/taketo/commands/ssh_options.rb', line 25 def identity_file %Q[-i #{shellescape @server.identity_file}] if @server.identity_file end |
#initialize(server) ⇒ Object
9 10 11 |
# File 'lib/taketo/commands/ssh_options.rb', line 9 def initialize(server) @server = server end |
#port ⇒ Object
17 18 19 |
# File 'lib/taketo/commands/ssh_options.rb', line 17 def port %Q[-p #{@server.port}] if @server.port end |
#username ⇒ Object
21 22 23 |
# File 'lib/taketo/commands/ssh_options.rb', line 21 def username %Q[#{shellescape @server.username}@] if @server.username end |