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, #delete_on_close?, #eql?, #expand, #generic?, #has_text?, included, #not_deleted?, #not_enclosing?, #root?, titleize, #to_s, #un_delete, #xml_name

Constructor Details

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

Returns a new instance of P.



151
152
153
# File 'lib/doc2text/odt_xml_namespaces.rb', line 151

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



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

def self.style_family
  'paragraph'
end

Instance Method Details

#closeObject



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

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

#openObject



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

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