Class: Rex::Ui::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/ui/output.rb

Overview

This class acts as a generic base class for outputing data. It only provides stubs for the simplest form of outputing information.

Direct Known Subclasses

None, Text::Output

Defined Under Namespace

Classes: None

Instance Method Summary collapse

Instance Method Details

#flushObject

Flushes any buffered output.



60
61
# File 'lib/rex/ui/output.rb', line 60

def flush
end

Prints a message with no decoration.



54
55
# File 'lib/rex/ui/output.rb', line 54

def print(msg='')
end

Prints an error message.



24
25
# File 'lib/rex/ui/output.rb', line 24

def print_error(msg='')
end

Prints a ‘good’ message.



30
31
# File 'lib/rex/ui/output.rb', line 30

def print_good(msg='')
end

Prints an undecorated line of information.



42
43
# File 'lib/rex/ui/output.rb', line 42

def print_line(msg='')
end

Prints a status line.



36
37
# File 'lib/rex/ui/output.rb', line 36

def print_status(msg='')
end

Prints a warning



48
49
# File 'lib/rex/ui/output.rb', line 48

def print_warning(msg='')
end

#prompting(v = true) ⇒ Object

Called to tell the output medium that we’re at a prompt. This is used to allow the output medium to display an extra carriage return



68
69
70
# File 'lib/rex/ui/output.rb', line 68

def prompting(v = true)
  @at_prompt = v
end

#prompting?Boolean

Returns whether or not we’re at a prompt currently

Returns:

  • (Boolean)


75
76
77
# File 'lib/rex/ui/output.rb', line 75

def prompting?
  @at_prompt
end