Class: Bogo::Ui::Table::BufferedTable

Inherits:
CommandLineReporter::Table
  • Object
show all
Defined in:
lib/bogo-ui/table.rb

Overview

Wrapper class to get desired buffering

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ self

Create new instance and init buffer



89
90
91
92
# File 'lib/bogo-ui/table.rb', line 89

def initialize(*args)
  @buffer = StringIO.new
  super
end

Instance Attribute Details

#bufferStringIO (readonly)

Returns:

  • (StringIO)


84
85
86
# File 'lib/bogo-ui/table.rb', line 84

def buffer
  @buffer
end

Instance Method Details

buffered print



100
101
102
# File 'lib/bogo-ui/table.rb', line 100

def print(string)
  buffer.print(string)
end

#puts(string) ⇒ Object

buffered puts



95
96
97
# File 'lib/bogo-ui/table.rb', line 95

def puts(string)
  buffer.puts(string)
end