class Paru::PandocFilter::TableBody
A TableBody
node represents a row in a table’s head or body
@!attribute attr
@return Attr
@!attribute rowheadcolumns
@return Value containing an Integer indicating the number of head columns.
@!attribute rowheadercolums
@return [Row]
@!attribute rows
@return [Row]
Attributes
attr[RW]
rowheadcolumnspec[RW]
rowheadercolumns[RW]
Public Class Methods
new(contents)
click to toggle source
Create a new TableBody
@param contents [Array] The contents of this TableBody
Calls superclass method
# File lib/paru/filter/table_body.rb, line 45 def initialize(contents) @attr = Attr.new contents[0] @rowheadcolumns = IntValue.new contents[1] @rowheadercolumns = contents[2].map {|r| Row.new r} super [] contents[3].each do |row| @children.push Row.new row end end
Public Instance Methods
ast_contents()
click to toggle source
The AST contents of this TableBody
@return [Array]
# File lib/paru/filter/table_body.rb, line 66 def ast_contents [ @attr.to_ast, @rowheadcolumns.to_ast, @rowheadercolumns.map {|r| r.to_ast}, @children.map {|child| child.to_ast} ] end
rows()
click to toggle source
The rows in this TableBody
@return [Array<Row>]
# File lib/paru/filter/table_body.rb, line 59 def rows() @children end
to_array()
click to toggle source
to_ast()
click to toggle source
Create an AST representation of this Node
@return [Hash]
# File lib/paru/filter/table_body.rb, line 78 def to_ast() ast_contents() end