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 ⇒ DocxColorScheme
readonly
Color of outline.
-
#width ⇒ OoxmlSize
readonly
Width of outline.
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
#==, #boolean_attribute_value, #parse_xml, #with_data?
Methods included from OoxmlObjectAttributeHelper
#attribute_enabled?, #option_enabled?
Methods included from OoxmlDocumentObjectHelper
Constructor Details
Instance Attribute Details
#color_scheme ⇒ DocxColorScheme (readonly)
Returns color of outline.
10 11 12 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 10 def color_scheme @color_scheme end |
#width ⇒ OoxmlSize (readonly)
Returns width of outline.
8 9 10 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 8 def width @width end |
Instance Method Details
#parse(node) ⇒ Outline
Parse Outline object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb', line 20 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 |