Class: BaseShell::SimpleConsole
- Inherits:
-
Object
- Object
- BaseShell::SimpleConsole
- Defined in:
- lib/rhcp_shell/base_shell.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(input = $stdin) ⇒ SimpleConsole
constructor
A new instance of SimpleConsole.
- #readline ⇒ Object
Constructor Details
#initialize(input = $stdin) ⇒ SimpleConsole
Returns a new instance of SimpleConsole.
20 21 22 |
# File 'lib/rhcp_shell/base_shell.rb', line 20 def initialize(input = $stdin) @input = input end |
Instance Method Details
#close ⇒ Object
34 35 |
# File 'lib/rhcp_shell/base_shell.rb', line 34 def close end |
#readline ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/rhcp_shell/base_shell.rb', line 24 def readline begin line = @input.readline line.chomp! if line line rescue EOFError nil end end |