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

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

Overview

Instance Attribute Summary

Attributes included from 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 included from Node

create_node, #delete, #eql?, #expand, #generic?, #has_text?, included, #not_enclosing?, #office_text?, #root?, titleize, #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.



131
132
133
# File 'lib/doc2text/odt_xml_namespaces.rb', line 131

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



135
136
137
# File 'lib/doc2text/odt_xml_namespaces.rb', line 135

def self.style_family
  'paragraph'
end

Instance Method Details

#closeObject



143
144
145
# File 'lib/doc2text/odt_xml_namespaces.rb', line 143

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

#openObject



139
140
141
# File 'lib/doc2text/odt_xml_namespaces.rb', line 139

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