class Paru::PandocFilter::List
Public Class Methods
Source
# 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
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
Public Instance Methods
Source
# File lib/paru/filter/list.rb, line 42 def ast_contents() @children.map {|child| child.ast_contents} end
Create an AST representation of this List
node
Source
# File lib/paru/filter/list.rb, line 49 def has_block?() true end
Has this List
node block contents?
@return [Boolean] true