Class: OoxmlParser::TextOutline
- Inherits:
-
OOXMLDocumentObject
- Object
- OOXMLDocumentObject
- OoxmlParser::TextOutline
- Defined in:
- lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_paragraph_run/text_outline.rb
Overview
Class for parsing ‘w:textOutline`
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) ⇒ TextOutline
constructor
A new instance of TextOutline.
-
#parse(node) ⇒ TextOutline
Parse TextOutline object.
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(parent: nil) ⇒ TextOutline
Returns a new instance of TextOutline.
9 10 11 12 13 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_paragraph_run/text_outline.rb', line 9 def initialize(parent: nil) @width = OoxmlSize.new(0) @color_scheme = :none super end |
Instance Attribute Details
#color_scheme ⇒ Object
Returns the value of attribute color_scheme.
7 8 9 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_paragraph_run/text_outline.rb', line 7 def color_scheme @color_scheme end |
#width ⇒ Object
Returns the value of attribute width.
7 8 9 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_paragraph_run/text_outline.rb', line 7 def width @width end |
Instance Method Details
#parse(node) ⇒ TextOutline
Parse TextOutline object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ooxml_parser/docx_parser/document_structure/docx_paragraph/docx_paragraph_run/text_outline.rb', line 18 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 |