Class: OoxmlParser::StyleParametres
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::StyleParametres
- Defined in:
- lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb
Instance Attribute Summary collapse
-
#hidden ⇒ Object
Returns the value of attribute hidden.
-
#name ⇒ Object
Returns the value of attribute name.
-
#q_format ⇒ Object
Returns the value of attribute q_format.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(name = nil, q_format = false, hidden = false, parent: nil) ⇒ StyleParametres
constructor
A new instance of StyleParametres.
-
#parse(node) ⇒ StyleParametres
Parse StyleParametres data.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, current_xml, dir, encrypted_file?, get_link_from_rels, unzip_file, #with_data?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
#initialize(name = nil, q_format = false, hidden = false, parent: nil) ⇒ StyleParametres
Returns a new instance of StyleParametres.
6 7 8 9 10 11 12 13 14 |
# File 'lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb', line 6 def initialize(name = nil, q_format = false, hidden = false, parent: nil) @name = name @q_format = q_format @hidden = hidden @parent = parent end |
Instance Attribute Details
#hidden ⇒ Object
Returns the value of attribute hidden.
4 5 6 |
# File 'lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb', line 4 def hidden @hidden end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb', line 4 def name @name end |
#q_format ⇒ Object
Returns the value of attribute q_format.
4 5 6 |
# File 'lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb', line 4 def q_format @q_format end |
Instance Method Details
#parse(node) ⇒ StyleParametres
Parse StyleParametres data
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ooxml_parser/docx_parser/docx_data/document_structure/docx_paragraph/style_parametres.rb', line 19 def parse(node) node.xpath('*').each do |node_child| case node_child.name when 'name' @name = node_child.attribute('val').value when 'qFormat' @q_format = option_enabled?(node_child) end end self end |