class Swordfish::Node::TableCell
Attributes
colspan[R]
merge_left[RW]
merge_up[RW]
rowspan[R]
Public Instance Methods
merge_left?()
click to toggle source
True if this cell is merged with the one to the left
# File lib/swordfish/nodes/table_cell.rb, line 13 def merge_left? !!@merge_left end
merge_up?()
click to toggle source
True if this cell is merged with the one above
# File lib/swordfish/nodes/table_cell.rb, line 18 def merge_up? !!@merge_up end
to_html()
click to toggle source
# File lib/swordfish/nodes/table_cell.rb, line 22 def to_html return nil if @colspan == 0 && @rowspan == 0 if @rowspan && @rowspan > 1 rowspan = " rowspan=#{@rowspan}" end if @colspan && @colspan > 1 colspan = " colspan=#{@colspan}" end "<td#{rowspan}#{colspan}>#{@children.map(&:to_html).join}</td>" end