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

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

Overview

Instance Attribute Summary

Attributes included from Node

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

Class Method Summary collapse

Instance Method Summary collapse

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

#fetch_common_style, #fetch_style

Methods included from Node

#<<, create_node, #delete_on_close?, #eql?, #generic?, #has_text?, included, #not_enclosing?, #remove_last_child!, #root?, titleize, #to_s, #xml_name

Constructor Details

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

Returns a new instance of P.



108
109
110
# File 'lib/doc2text/namespaces.rb', line 108

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

Class Method Details

.style_familyObject



112
113
114
# File 'lib/doc2text/namespaces.rb', line 112

def self.style_family
  'paragraph'
end

Instance Method Details

#closeObject



120
121
122
# File 'lib/doc2text/namespaces.rb', line 120

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

#openObject



116
117
118
# File 'lib/doc2text/namespaces.rb', line 116

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