Class: Doc2Text::Odt::XmlNodes::Text::H
- Inherits:
-
Node
- Object
- XmlBasedDocument::XmlNodes::Node
- Node
- Doc2Text::Odt::XmlNodes::Text::H
- Includes:
- Doc2Text::Odt::XmlNodes::Text
- Defined in:
- lib/doc2text/odt/odt_xml_namespaces.rb
Overview
docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1419212_253892949
Instance Attribute Summary
Attributes inherited from XmlBasedDocument::XmlNodes::Node
#attrs, #children, #name, #parent, #prefix, #text
Class Method Summary collapse
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(parent = nil, attrs = [], prefix = nil, name = nil, markdown_odt_parser = nil) ⇒ H
constructor
A new instance of H.
- #open ⇒ Object
Methods included from Doc2Text::Odt::XmlNodes::Text
#fetch_style, #fetch_style?, #find_style
Methods inherited from Node
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) ⇒ H
Returns a new instance of H.
128 129 130 131 132 133 134 135 136 137 |
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 128 def initialize(parent = nil, attrs = [], prefix = nil, name = nil, markdown_odt_parser = nil) super parent, attrs, prefix, name, markdown_odt_parser outline_level_index = attrs.index { |attr| attr.prefix == 'text' && attr.localname == 'outline-level' } if outline_level_index and fetch_style? @elem_outline_level = attrs[outline_level_index].value.to_i else @elem_outline_level = 0 end end |
Class Method Details
.style_family ⇒ Object
139 140 141 |
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 139 def self.style_family 'paragraph' end |
Instance Method Details
#close ⇒ Object
147 148 149 |
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 147 def close "\n\n" end |
#open ⇒ Object
143 144 145 |
# File 'lib/doc2text/odt/odt_xml_namespaces.rb', line 143 def open "\n#{'#' * @elem_outline_level} " end |