Method: Expect4r::BaseLoginObject#spawnee

Defined in:
lib/misc/base.rb

#spawneeObject



163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/misc/base.rb', line 163

def spawnee
  case method
  when :telnet  ; "telnet #{host} #{port if port>0}"
  when :ssh
    cmd  ="ssh #{host}"
    cmd +=" -oPort=#{port}"             if port>0
    cmd +=" -oUser=#{spawnee_username}" if spawnee_username
    cmd += [" ", [ssh_options]].flatten.join(" ") if ssh_options
    cmd
  else
    raise RuntimeError
  end
end