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.
25 26 27 |
# File 'lib/rex/ui/text/shell.rb', line 25 def output @output end |
#prompt ⇒ Object
Returns the value of attribute prompt.
25 26 27 |
# File 'lib/rex/ui/text/shell.rb', line 25 def prompt @prompt end |
Instance Method Details
#pgets ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rex/ui/text/shell.rb', line 27 def pgets output.print(prompt) output.flush output.prompting buf = gets output.prompting(false) buf end |