class OoxmlParser::Outline

Class for parsing `w:ln` tags

Attributes

color_scheme[R]

@return [DocxColorScheme] color of outline

width[R]

@return [OoxmlSize] width of outline

Public Class Methods

new(parent: nil) click to toggle source
Calls superclass method OoxmlParser::OOXMLDocumentObject::new
# File lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb, line 12
def initialize(parent: nil)
  @width = OoxmlSize.new(0)
  super
end

Public Instance Methods

parse(node) click to toggle source

Parse Outline object @param node [Nokogiri::XML:Element] node to parse @return [Outline] result of parsing

# 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