sandal (owner)

Revisions

gist: 217596 Download_button fork
public
Public Clone URL: git://gist.github.com/217596.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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