Class: ODFReport::Text
Constant Summary
Constants inherited from Field
Instance Attribute Summary collapse
-
#parser ⇒ Object
Returns the value of attribute parser.
Instance Method Summary collapse
Methods inherited from Field
Constructor Details
This class inherits a constructor from ODFReport::Field
Instance Attribute Details
#parser ⇒ Object
Returns the value of attribute parser.
5 6 7 |
# File 'lib/odf-report/text.rb', line 5 def parser @parser end |
Instance Method Details
#replace!(doc, data_item = nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/odf-report/text.rb', line 7 def replace!(doc, data_item = nil) return unless node = find_text_node(doc) @parser = Parser::Default.new(@data_source.value, node) @parser.paragraphs.each do |p| node.before(p) end node.remove end |