Method: Excavator::TableView#initialize

Defined in:
lib/excavator/table_view.rb

#initialize(options = {}) {|_self| ... } ⇒ TableView

Returns a new instance of TableView.

Yields:

  • (_self)

Yield Parameters:



10
11
12
13
14
15
16
17
18
19
# File 'lib/excavator/table_view.rb', line 10

def initialize(options = {})
  @options = options
  @_title = ""
  @_headers = []
  @_records = []
  @col_widths = Hash.new { |hash, key| hash[key] = 0 }
  @divider = options[:divider] || DEFAULT_DIVIDER

  yield self if block_given?
end