Class: OoxmlParser::Suffix
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::Suffix
- Defined in:
- lib/ooxml_parser/docx_parser/document_structure/numbering/abstract_numbering/numbering_level/suffix.rb
Overview
Class for storing Suffix ‘w:suff` This element specifies the content which shall be added between a given numbering level’s text and the text of every numbered paragraph which references that numbering level. If this element is omitted, then its value shall be assumed to be tab. >ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference 17.9.29.
Instance Attribute Summary collapse
-
#value ⇒ String
Value of suffix.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(value = :tab, parent: nil) ⇒ Suffix
constructor
A new instance of Suffix.
-
#parse(node) ⇒ Suffix
Parse Suffix.
Methods inherited from OOXMLDocumentObject
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(value = :tab, parent: nil) ⇒ Suffix
Returns a new instance of Suffix.
14 15 16 17 18 |
# File 'lib/ooxml_parser/docx_parser/document_structure/numbering/abstract_numbering/numbering_level/suffix.rb', line 14 def initialize(value = :tab, parent: nil) @value = value super(parent: parent) end |
Instance Attribute Details
#value ⇒ String
Returns value of suffix.
12 13 14 |
# File 'lib/ooxml_parser/docx_parser/document_structure/numbering/abstract_numbering/numbering_level/suffix.rb', line 12 def value @value end |
Instance Method Details
#parse(node) ⇒ Suffix
Parse Suffix
23 24 25 26 27 28 29 30 31 |
# File 'lib/ooxml_parser/docx_parser/document_structure/numbering/abstract_numbering/numbering_level/suffix.rb', line 23 def parse(node) node.attributes.each do |key, value| case key when 'val' @value = value.value.to_sym end end self end |