class Paru::PandocFilter::Cell
A Cell
node represents a cell in a table’s head, body, or foot.
@!attribute attr
@return Attr
@!attribute alignment
@return Value containing a String, one of AlignRight, AlignLeft, AlignCenter, or AlignDefault.
@!attribute rowspan
@return Value containing an Integer
@!attribute colspan
@return Value containing an Integer
Attributes
Public Class Methods
Source
# File lib/paru/filter/cell.rb, line 45 def initialize(contents) @attr = Attr.new contents[0] @alignment = Value.new contents[1] @rowspan = IntValue.new contents[2] @colspan = IntValue.new contents[3] super contents[4] end
Create a new Cell
based on the row_data
@param contents [Array]
Calls superclass method
Public Instance Methods
Source
# File lib/paru/filter/cell.rb, line 57 def ast_contents [ @attr.to_ast, @alignment.to_ast, @rowspan.to_ast, @colspan.to_ast, @children.map {|child| child.to_ast} ] end
The AST contents of this Cell
@return [Array]