Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Forked from bradediger/gist:217595
Created October 24, 2009 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save practicingruby/217596 to your computer and use it in GitHub Desktop.
Save practicingruby/217596 to your computer and use it in GitHub Desktop.
acc += (e.is_a?(Hash) && e.has_key?(:colspan)) ? e[:colspan] : 1
cell_text = cell.is_a?(Hash) ? cell[:text] : cell.to_s
if cell.is_a?(Hash) && cell[:colspan]
text = e.is_a?(Hash) ? e[:text] : e.to_s
width = if e.is_a?(Hash) && e.has_key?(:colspan)
if e.is_a?(Hash)
opts = e.dup
opts.delete(:colspan)
cell_options.update(opts)
end
col_index += (e.is_a?(Hash) && e.has_key?(:colspan)) ? e[:colspan] : 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment