Sha256: 40b4e4a1f95cbfc109fea741122271f533279cd448d2467aebbda346a35f9dd4

Contents?: true

Size: 509 Bytes

Versions: 2

Compression:

Stored size: 509 Bytes

Contents

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

    def initialize
      @width = 0
    end

    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ooxml_parser-0.1.2 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb
ooxml_parser-0.1.1 lib/ooxml_parser/common_parser/common_data/paragraph/paragraph_run/run_properties/outline.rb