Sha256: 25a85d675ce44a80ca7f50a84151574c02847a670b560acb55937c1fc2772eae

Contents?: true

Size: 686 Bytes

Versions: 4

Compression:

Stored size: 686 Bytes

Contents

# Class for parsing Run Outline properties
module OoxmlParser
  # Class for parsing `w:ln` tags
  class Outline < OOXMLDocumentObject
    attr_accessor :width
    attr_accessor :color_scheme

    def initialize(parent: nil)
      @width = OoxmlSize.new(0)
      @parent = parent
    end

    # Parse Outline object
    # @param node [Nokogiri::XML:Element] node to parse
    # @return [Outline] result of parsing
    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
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ooxml_parser-0.4.1 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb
ooxml_parser-0.4.0 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb
ooxml_parser-0.3.0 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb
ooxml_parser-0.2.0 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb