class Paru::PandocFilter::List
Public Class Methods
new(contents, node_class = Block)
click to toggle source
Create a new List
node based on contents
@param contents [Array] the contents of the list @param node_class [Node = PandocFilter::Block
] the contents are {Inline} nodes
Calls superclass method
# File lib/paru/filter/list.rb, line 31 def initialize(contents, node_class = Block) super [] contents.each do |item| child = node_class.new(item) child.parent = self @children.push child end end
Public Instance Methods
ast_contents()
click to toggle source
Create an AST representation of this List
node
# File lib/paru/filter/list.rb, line 42 def ast_contents() @children.map {|child| child.ast_contents} end
has_block?()
click to toggle source
Has this List
node block contents?
@return [Boolean] true
# File lib/paru/filter/list.rb, line 49 def has_block?() true end