class OpenXml::Xlsx::Elements::PatternFill

Public Instance Methods

to_xml(xml) click to toggle source
# File lib/openxml/xlsx/elements/pattern_fill.rb, line 6
def to_xml(xml)
  xml.fill do
    xml.patternFill(patternType: type) do
      if type.to_s == "solid"
        foreground_color.to_xml("fgColor", xml)
        background_color.to_xml("bgColor", xml)
      end
    end
  end
end