Class: EacRubyUtils::Envs::SshEnv
- Defined in:
- lib/eac_ruby_utils/envs/ssh_env.rb
Instance Method Summary collapse
- #command_line(line) ⇒ Object
-
#initialize(user_hostname) ⇒ SshEnv
constructor
A new instance of SshEnv.
- #to_s ⇒ Object
Methods inherited from BaseEnv
Constructor Details
#initialize(user_hostname) ⇒ SshEnv
Returns a new instance of SshEnv.
4 5 6 |
# File 'lib/eac_ruby_utils/envs/ssh_env.rb', line 4 def initialize(user_hostname) @user_hostname = user_hostname end |
Instance Method Details
#command_line(line) ⇒ Object
12 13 14 |
# File 'lib/eac_ruby_utils/envs/ssh_env.rb', line 12 def command_line(line) "ssh #{Shellwords.escape(@user_hostname)} #{Shellwords.escape(line)}" end |
#to_s ⇒ Object
8 9 10 |
# File 'lib/eac_ruby_utils/envs/ssh_env.rb', line 8 def to_s "SSH(#{@user_hostname})" end |