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

Instance Method Summary collapse

Instance Attribute Details

#user_outputObject

The user output handle.



96
97
98
# File 'lib/rex/ui/subscriber.rb', line 96

def user_output
  @user_output
end

Instance Method Details

#flushObject

Wraps user_output.flush



89
90
91
# File 'lib/rex/ui/subscriber.rb', line 89

def flush
  user_output.flush if (user_output)
end

Wraps user_output.print



82
83
84
# File 'lib/rex/ui/subscriber.rb', line 82

def print(msg='')
  user_output.print(msg) if (user_output)
end

Wraps user_output.print_debug



62
63
64
65
66
67
# File 'lib/rex/ui/subscriber.rb', line 62

def print_debug(msg='')
  if (user_output)
    print_blank_line if user_output.prompting?
    user_output.print_debug(msg)
  end
end

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

Wraps user_output.print_good



52
53
54
55
56
57
# File 'lib/rex/ui/subscriber.rb', line 52

def print_good(msg='')
  if (user_output)
    print_blank_line if user_output.prompting?
    user_output.print_good(msg)
  end
end

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

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

Wraps user_output.print_warning



72
73
74
75
76
77
# File 'lib/rex/ui/subscriber.rb', line 72

def print_warning(msg='')
  if (user_output)
    print_blank_line if user_output.prompting?
    user_output.print_warning(msg)
  end
end