Class: OoxmlParser::Outline
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::Outline
- Defined in:
- lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb
Overview
Class for parsing ‘w:ln` tags
Instance Attribute Summary collapse
-
#color_scheme ⇒ Object
Returns the value of attribute color_scheme.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from OOXMLDocumentObject
Instance Method Summary collapse
-
#initialize(parent: nil) ⇒ Outline
constructor
A new instance of Outline.
-
#parse(node) ⇒ Outline
Parse Outline object.
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
Instance Attribute Details
#color_scheme ⇒ Object
Returns the value of attribute color_scheme.
6 7 8 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 6 def color_scheme @color_scheme end |
#width ⇒ Object
Returns the value of attribute width.
5 6 7 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 5 def width @width end |
Instance Method Details
#parse(node) ⇒ Outline
Parse Outline object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 16 def parse(node) node.attributes.each do |key, value| case key when 'w' @width = OoxmlSize.new(value.value.to_f, :emu) end end @color_scheme = DocxColorScheme.new(parent: self).parse(node) self end |