Class: Parchment::ODT::TextRun

Inherits:
TextRun
  • Object
show all
Defined in:
lib/parchment/formats/odt/text_run.rb

Instance Attribute Summary

Attributes inherited from TextRun

#style

Instance Method Summary collapse

Methods inherited from TextRun

#font_size, #to_html, #to_s

Methods included from Helpers

#html_tag

Constructor Details

#initialize(node, paragraph, document) ⇒ TextRun

Returns a new instance of TextRun.



5
6
7
8
9
10
11
12
13
14
# File 'lib/parchment/formats/odt/text_run.rb', line 5

def initialize(node, paragraph, document)
  @node = node
  if @node.attributes.empty?
    @style = paragraph.style
  else
    @style_id = @node.attributes['style-name'].value
    @style = document.get_style_by_id(@style_id)
  end
  super(paragraph, document)
end