class Terminal::Table
def render_headings
def render_headings Y + headings.map_with_index do |heading, i| width = 0 if heading.is_a?(Hash) and !heading[:colspan].nil? i.upto(i + heading[:colspan] - 1) do |col| width += length_of_column(col) end width += (heading[:colspan] - 1) * (Y.length + 2) else width = length_of_column(i) end Heading.new( width, heading).render end.join(Y) + Y end