Class: BaseShell::SimpleConsole
- Inherits:
-
Object
- Object
- BaseShell::SimpleConsole
- Defined in:
- lib/vop/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.
22 23 24 |
# File 'lib/vop/shell/base_shell.rb', line 22 def initialize(input = $stdin) @input = input end |
Instance Method Details
#close ⇒ Object
36 37 |
# File 'lib/vop/shell/base_shell.rb', line 36 def close end |
#readline ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/vop/shell/base_shell.rb', line 26 def readline begin line = @input.readline line.chomp! if line line rescue EOFError nil end end |