Class: Doc2Text::Odt::XmlNodes::Text::P

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

Methods inherited from Node

create_node, #office_text?

Methods inherited from XmlBasedDocument::XmlNodes::Node

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

Constructor Details

#initialize(parent = nil, attrs = [], prefix = nil, name = nil, markdown_odt_parser = nil) ⇒ P

Returns a new instance of P.



155
156
157
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 155

def initialize(parent = nil, attrs = [], prefix = nil, name = nil, markdown_odt_parser = nil)
  super parent, attrs, prefix, name, markdown_odt_parser
end

Class Method Details

.style_familyObject



159
160
161
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 159

def self.style_family
  'paragraph'
end

Instance Method Details

#closeObject



167
168
169
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 167

def close
  "#{@enclosing_style.reverse.join}\n"
end

#openObject



163
164
165
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 163

def open
  "\n#{@enclosing_style.join}"
end