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



107
108
109
110
# File 'lib/bogo/ui/table.rb', line 107

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

Instance Attribute Details

#bufferStringIO (readonly)

Returns:

  • (StringIO)


102
103
104
# File 'lib/bogo/ui/table.rb', line 102

def buffer
  @buffer
end

Instance Method Details

buffered print



118
119
120
# File 'lib/bogo/ui/table.rb', line 118

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

#puts(string) ⇒ Object

buffered puts



113
114
115
# File 'lib/bogo/ui/table.rb', line 113

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