Module: Rex::Ui::Subscriber::Output
- Included in:
- Rex::Ui::Subscriber
- Defined in:
- lib/rex/ui/subscriber.rb
Overview
Subscribes to the output half of the user interface.
Instance Attribute Summary collapse
-
#user_output ⇒ Object
The user output handle.
Instance Method Summary collapse
-
#flush ⇒ Object
Wraps user_output.flush.
-
#print(msg = '') ⇒ Object
Wraps user_output.print.
-
#print_blank_line ⇒ Object
protected
Prints a blank line.
-
#print_error(msg = '') ⇒ Object
(also: #print_bad)
Wraps user_output.print_error.
-
#print_good(msg = '') ⇒ Object
Wraps user_output.print_good.
-
#print_line(msg = '') ⇒ Object
Wraps user_output.print_line.
-
#print_status(msg = '') ⇒ Object
Wraps user_output.print_status.
-
#print_warning(msg = '') ⇒ Object
Wraps user_output.print_warning.
Instance Attribute Details
#user_output ⇒ Object
The user output handle.
88 89 90 |
# File 'lib/rex/ui/subscriber.rb', line 88 def user_output @user_output end |
Instance Method Details
#flush ⇒ Object
Wraps user_output.flush
81 82 83 |
# File 'lib/rex/ui/subscriber.rb', line 81 def flush user_output.flush if (user_output) end |
#print(msg = '') ⇒ Object
Wraps user_output.print
74 75 76 |
# File 'lib/rex/ui/subscriber.rb', line 74 def print(msg='') user_output.print(msg) if (user_output) end |
#print_blank_line ⇒ Object (protected)
Prints a blank line. Used when the input is prompting.
95 96 97 98 |
# File 'lib/rex/ui/subscriber.rb', line 95 def print_blank_line user_output.prompting(false) user_output.print_line end |
#print_error(msg = '') ⇒ Object Also known as: print_bad
Wraps user_output.print_error
42 43 44 45 46 47 |
# File 'lib/rex/ui/subscriber.rb', line 42 def print_error(msg='') if (user_output) print_blank_line if user_output.prompting? user_output.print_error(msg) end end |
#print_good(msg = '') ⇒ Object
Wraps user_output.print_good
54 55 56 57 58 59 |
# File 'lib/rex/ui/subscriber.rb', line 54 def print_good(msg='') if (user_output) print_blank_line if user_output.prompting? user_output.print_good(msg) end end |
#print_line(msg = '') ⇒ Object
Wraps user_output.print_line
22 23 24 25 26 27 |
# File 'lib/rex/ui/subscriber.rb', line 22 def print_line(msg='') if (user_output) print_blank_line if user_output.prompting? user_output.print_line(msg) end end |
#print_status(msg = '') ⇒ Object
Wraps user_output.print_status
32 33 34 35 36 37 |
# File 'lib/rex/ui/subscriber.rb', line 32 def print_status(msg='') if (user_output) print_blank_line if user_output.prompting? user_output.print_status(msg) end end |
#print_warning(msg = '') ⇒ Object
Wraps user_output.print_warning
64 65 66 67 68 69 |
# File 'lib/rex/ui/subscriber.rb', line 64 def print_warning(msg='') if (user_output) print_blank_line if user_output.prompting? user_output.print_warning(msg) end end |