Class: Expect4r::Shell

Inherits:
Base
  • Object
show all
Defined in:
lib/misc/shell.rb

Instance Method Summary collapse

Methods inherited from Base

add, all

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

#initializeShell

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'
  
end

Instance Method Details

#loginObject



11
12
13
# File 'lib/misc/shell.rb', line 11

def 
  spawn @shell
end