Module: Rex::Ui::Text::Shell::InputShell
- Defined in:
- lib/rex/ui/text/shell.rb
Overview
This module is meant to be mixed into an input medium class instance as a means of extending it to display a prompt before each call to gets.
Instance Attribute Summary collapse
-
#output ⇒ Object
Returns the value of attribute output.
-
#prompt ⇒ Object
Returns the value of attribute prompt.
Instance Method Summary collapse
Instance Attribute Details
#output ⇒ Object
Returns the value of attribute output.
23 24 25 |
# File 'lib/rex/ui/text/shell.rb', line 23 def output @output end |
#prompt ⇒ Object
Returns the value of attribute prompt.
23 24 25 |
# File 'lib/rex/ui/text/shell.rb', line 23 def prompt @prompt end |
Instance Method Details
#pgets ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rex/ui/text/shell.rb', line 25 def pgets() output.print(prompt) output.flush output.prompting buf = gets output.prompting(false) buf end |