class Rex::Ui::Text::Output::Buffer
This class implements output against a buffer.
Attributes
buf[RW]
The underlying buffer state.
Public Class Methods
new()
click to toggle source
Initializes an output buffer.
# File lib/rex/ui/text/output/buffer.rb, line 17 def initialize self.buf = '' end
Public Instance Methods
dump_buffer()
click to toggle source
Read everything out of the buffer and reset it
# File lib/rex/ui/text/output/buffer.rb, line 38 def dump_buffer self.buf ||= '' buffer = self.buf.dup reset() buffer end
print_raw(msg = '')
click to toggle source
Appends the supplied message to the output buffer.
# File lib/rex/ui/text/output/buffer.rb, line 28 def print_raw(msg = '') self.buf += msg || '' msg end
reset()
click to toggle source
Reset the buffer to an empty string.
# File lib/rex/ui/text/output/buffer.rb, line 48 def reset self.buf = '' end
supports_color?()
click to toggle source
# File lib/rex/ui/text/output/buffer.rb, line 21 def supports_color? false end