Class: JSCommander::Shell::SimpleConsole
- Inherits:
-
Object
- Object
- JSCommander::Shell::SimpleConsole
- Defined in:
- lib/jscmd/shell.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(input = $stdin) ⇒ SimpleConsole
constructor
A new instance of SimpleConsole.
- #readline ⇒ Object
- #show_banner ⇒ Object
Constructor Details
#initialize(input = $stdin) ⇒ SimpleConsole
Returns a new instance of SimpleConsole.
9 10 11 |
# File 'lib/jscmd/shell.rb', line 9 def initialize(input = $stdin) @input = input end |
Instance Method Details
#close ⇒ Object
26 27 |
# File 'lib/jscmd/shell.rb', line 26 def close end |
#readline ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/jscmd/shell.rb', line 16 def readline begin line = @input.readline line.chomp! if line line rescue EOFError nil end end |
#show_banner ⇒ Object
13 14 |
# File 'lib/jscmd/shell.rb', line 13 def end |