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
alignment[RW]
attr[RW]
colspan[RW]
rowspan[RW]
Public Class Methods
new(contents)
click to toggle source
Create a new Cell
based on the row_data
@param contents [Array]
Calls superclass method
# 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
Public Instance Methods
ast_contents()
click to toggle source
The AST contents of this Cell
@return [Array]
# 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
to_ast()
click to toggle source
Create an AST representation of this Node
@return [Hash]
# File lib/paru/filter/cell.rb, line 70 def to_ast() ast_contents() end