Class: Doc2Text::Odt::XmlNodes::Text::Span

Inherits:
Node show all
Includes:
Doc2Text::Odt::XmlNodes::Text
Defined in:
lib/doc2text/odt/odt_xml_namespaces.rb

Overview

Instance Attribute Summary

Attributes inherited from XmlBasedDocument::XmlNodes::Node

#attrs, #children, #name, #parent, #prefix, #text

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Doc2Text::Odt::XmlNodes::Text

#fetch_style, #fetch_style?, #find_style, #initialize

Methods inherited from Node

create_node, #office_text?

Methods inherited from XmlBasedDocument::XmlNodes::Node

#delete, #eql?, #generic?, #has_text?, inherited, #initialize, #root?, #to_s, #xml_name

Class Method Details

.style_familyObject



183
184
185
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 183

def self.style_family
  'text'
end

Instance Method Details

#closeObject



191
192
193
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 191

def close
  @enclosing_style.reverse.join
end

#expandObject



195
196
197
198
199
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 195

def expand
  expanded = "#{open}#{@children.map(&:expand).join}#{close}"
  delete
  expanded.clone
end

#openObject



187
188
189
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 187

def open
  @enclosing_style.join
end