Class: Bogo::Ui::Table::BufferedRow

Inherits:
CommandLineReporter::Row
  • 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(options = {}) ⇒ self

Create new instance and init buffer



133
134
135
136
# File 'lib/bogo/ui/table.rb', line 133

def initialize(options={})
  @buffer = options.delete(:buffer)
  super
end

Instance Attribute Details

#bufferStringIO (readonly)

Returns:

  • (StringIO)


128
129
130
# File 'lib/bogo/ui/table.rb', line 128

def buffer
  @buffer
end

Instance Method Details

buffered print



144
145
146
# File 'lib/bogo/ui/table.rb', line 144

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

#puts(string) ⇒ Object

buffered puts



139
140
141
# File 'lib/bogo/ui/table.rb', line 139

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