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
Public Class Methods
Source
# 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
Create a new TableBody
@param contents [Array] The contents of this TableBody
Calls superclass method
Public Instance Methods
Source
# 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
The AST contents of this TableBody
@return [Array]
Source
# File lib/paru/filter/table_body.rb, line 59 def rows() @children end
The rows in this TableBody
@return [Array<Row>]