class Sablon::HTMLConverter::Paragraph
An AST node representing the top level content container for a word document. These cannot be nested within other paragraph elements
Constants
- CHILD_TAGS
Permitted child tags defined by the OpenXML spec
- PROPERTIES
Attributes
runs[RW]
Public Class Methods
new(env, node, properties)
click to toggle source
Calls superclass method
Sablon::HTMLConverter::Node::new
# File lib/sablon/html/ast.rb, line 175 def initialize(env, node, properties) super properties = self.class.process_properties(properties) @properties = NodeProperties.paragraph(properties) # trans_props = transferred_properties @runs = ASTBuilder.html_to_ast(env, node.children, trans_props) @runs = Collection.new(@runs) end
Public Instance Methods
accept(visitor)
click to toggle source
Calls superclass method
Sablon::HTMLConverter::Node#accept
# File lib/sablon/html/ast.rb, line 189 def accept(visitor) super runs.accept(visitor) end
inspect()
click to toggle source
# File lib/sablon/html/ast.rb, line 194 def inspect "<Paragraph{#{@properties[:pStyle]}}: #{runs.inspect}>" end
to_docx()
click to toggle source
Calls superclass method
Sablon::HTMLConverter::Node#to_docx
# File lib/sablon/html/ast.rb, line 185 def to_docx super('w:p') end
Private Instance Methods
children_to_docx()
click to toggle source
# File lib/sablon/html/ast.rb, line 200 def children_to_docx runs.to_docx end