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 outputting data. It only provides stubs for the simplest form of outputting information.

Direct Known Subclasses

None, Text::Output

Defined Under Namespace

Classes: None

Instance Method Summary collapse

Instance Method Details

#flushObject

Flushes any buffered output.



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

def flush
end

Prints a message with no decoration.



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

def print(msg='')
end

Prints an error message.



21
22
# File 'lib/rex/ui/output.rb', line 21

def print_error(msg='')
end

Prints a ‘good’ message.



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

def print_good(msg='')
end

Prints an undecorated line of information.



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

def print_line(msg='')
end

Prints a status line.



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

def print_status(msg='')
end

Prints a warning



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

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



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

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

#prompting?Boolean

Returns whether or not we’re at a prompt currently

Returns:

  • (Boolean)


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

def prompting?
  @at_prompt
end