Class: Expect4r::Shell
Instance Method Summary collapse
-
#initialize ⇒ Shell
constructor
A new instance of Shell.
- #login ⇒ Object
Methods inherited from Base
Methods included from Expect4r
#_login, #child_exit, #connected?, #exp_print, #exp_puts, #exp_send, #expect, #get_prompt, #getc, #interact, #login_by_proxy, #logout, #putc, #putcr, #read_until, #readline, #spawn
Constructor Details
#initialize ⇒ Shell
Returns a new instance of Shell.
3 4 5 6 7 8 9 10 |
# File 'lib/misc/shell.rb', line 3 def initialize() super ENV['PROMPT_COMMAND']="date +%k:%m:%S" ENV['PS1']="shell>" @ps1 = /shell>$/ @shell = ENV['SHELL'] || 'bash' login end |
Instance Method Details
#login ⇒ Object
11 12 13 |
# File 'lib/misc/shell.rb', line 11 def login spawn @shell end |