Sha256: 263c68b7264c210cad50f89f521b2fd18659e070742e172e59d4dc8c285f1a5d
Contents?: true
Size: 986 Bytes
Versions: 49
Compression:
Stored size: 986 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Parsing `patternFill` tag class PatternFill < OOXMLDocumentObject # @return [String] pattern type attr_accessor :pattern_type # @return [Color] foreground color attr_accessor :foreground_color # @return [Color] background color attr_accessor :background_color # Parse PatternFill data # @param [Nokogiri::XML:Element] node with PatternFill data # @return [PatternFill] value of PatternFill data def parse(node) node.attributes.each do |key, value| case key when 'patternType' @pattern_type = value.value.to_sym end end node.xpath('*').each do |node_child| case node_child.name when 'fgColor' @foreground_color = OoxmlColor.new(parent: self).parse(node_child) when 'bgColor' @background_color = OoxmlColor.new(parent: self).parse(node_child) end end self end end end
Version data entries
49 entries across 49 versions & 1 rubygems