class OoxmlParser::DocxPatternFill

Docx Pattern Fill Data

Attributes

background_color[RW]
foreground_color[RW]
preset[RW]

Public Instance Methods

parse(node) click to toggle source

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

# File lib/ooxml_parser/common_parser/common_data/alternate_content/drawing/graphic/shape/shape_properties/color/docx_pattern_fill.rb, line 11
def parse(node)
  @preset = node.attribute('prst').value.to_sym
  node.xpath('*').each do |node_child|
    case node_child.name
    when 'fgClr'
      @foreground_color = Color.new(parent: self).parse_color_model(node_child)
    when 'bgClr'
      @background_color = Color.new(parent: self).parse_color_model(node_child)
    end
  end
  self
end