class TablePrint::RowGroup

def collapse!

def collapse!
  @children.each(&:collapse!)
end

def format

TODO: rename this to_s
def format
  rows = @children
  rows = @children[1..-1] if @skip_first_row
  rows ||= []
  rows = rows.collect { |row| row.format }.join("\n")
  return nil if rows.length == 0
  rows
end

def initialize

def initialize
  super
  @skip_first_row = false
end

def raw_column_data(column_name)

def raw_column_data(column_name)
  @children.collect { |r| r.raw_column_data(column_name) }.flatten
end

def raw_column_names

def raw_column_names
  return @raw_column_names if @raw_column_names
  @raw_column_names = @children.collect { |r| r.raw_column_names }.flatten.uniq
end

def skip_first_row!

def skip_first_row!
  @skip_first_row = true
end

def vis(prefix="")

this is a development tool, to show the structure of the row/row_group tree
def vis(prefix="")
  puts "#{prefix}group"
  children.each{|c| c.vis(prefix + "  ")}
end