class Sablon::HTMLConverter::Run
Create a run of text in the document, runs cannot be nested within each other
Constants
- PROPERTIES
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 485 def initialize(_env, node, properties) super properties = self.class.process_properties(properties) @properties = NodeProperties.run(properties) @string = node.to_s # using `text` doesn't reconvert HTML entities end
Public Instance Methods
inspect()
click to toggle source
# File lib/sablon/html/ast.rb, line 496 def inspect "<Run{#{@properties.inspect}}: #{@string}>" end
to_docx()
click to toggle source
Calls superclass method
Sablon::HTMLConverter::Node#to_docx
# File lib/sablon/html/ast.rb, line 492 def to_docx super('w:r') end
Private Instance Methods
children_to_docx()
click to toggle source
# File lib/sablon/html/ast.rb, line 502 def children_to_docx content = @string.tr("\u00A0", ' ') "<w:t xml:space=\"preserve\">#{content}</w:t>" end