class OoxmlParser::PresentationPattern
Class for parsing ‘pattFill` tag
Attributes
Public Instance Methods
Source
# File lib/ooxml_parser/common_parser/common_data/colors/presentation_fill/presentation_pattern.rb, line 11 def parse(node) node.attributes.each do |key, value| case key when 'prst' @preset = value.value.to_sym end end node.xpath('*').each do |color_node| case color_node.name when 'fgClr' @foreground_color = Color.new(parent: self).parse_color(color_node.xpath('*').first) when 'bgClr' @background_color = Color.new(parent: self).parse_color(color_node.xpath('*').first) end end self end
Parse PresentationPattern
object @param node [Nokogiri::XML:Element] node to parse @return [PresentationPattern] result of parsing