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
Constant Summary
Constants inherited from OOXMLDocumentObject
OoxmlParser::OOXMLDocumentObject::DEFAULT_DIRECTORY_FOR_MEDIA
Instance Attribute Summary collapse
-
#color_scheme ⇒ Object
Returns the value of attribute color_scheme.
-
#width ⇒ Object
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Outline
constructor
A new instance of Outline.
Methods inherited from OOXMLDocumentObject
#==, add_to_xmls_stack, copy_file_and_rename_to_zip, copy_media_file, current_xml, dir, encrypted_file?, get_link_from_rels, media_folder, option_enabled?, unzip_file
Constructor Details
#initialize ⇒ Outline
Returns a new instance of Outline.
7 8 9 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 7 def initialize @width = 0 end |
Instance Attribute Details
#color_scheme ⇒ Object
Returns the value of attribute color_scheme.
5 6 7 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 5 def color_scheme @color_scheme end |
#width ⇒ Object
Returns the value of attribute width.
4 5 6 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 4 def width @width end |
Class Method Details
.parse(node) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 11 def self.parse(node) outline = Outline.new node.attributes.each do |key, value| case key when 'w' outline.width = (value.value.to_f / 12_699.3).round(2) end end outline.color_scheme = DocxColorScheme.parse(node) outline end |