Class: Vop::ShellInputReadline
- Inherits:
-
Object
- Object
- Vop::ShellInputReadline
- Defined in:
- lib/vop/shell/shell_input_readline.rb
Instance Method Summary collapse
- #exit ⇒ Object
-
#initialize(completion_method) ⇒ ShellInputReadline
constructor
A new instance of ShellInputReadline.
- #read(prompt) ⇒ Object
Constructor Details
#initialize(completion_method) ⇒ ShellInputReadline
Returns a new instance of ShellInputReadline.
5 6 7 8 |
# File 'lib/vop/shell/shell_input_readline.rb', line 5 def initialize(completion_method) Readline.completion_append_character = "" Readline.completion_proc = completion_method end |
Instance Method Details
#exit ⇒ Object
14 15 16 |
# File 'lib/vop/shell/shell_input_readline.rb', line 14 def exit Kernel.exit end |
#read(prompt) ⇒ Object
10 11 12 |
# File 'lib/vop/shell/shell_input_readline.rb', line 10 def read(prompt) Readline.readline(prompt, true) end |