class OpenXml::Xlsx::Elements::Font

Public Instance Methods

to_xml(xml) click to toggle source
# File lib/openxml/xlsx/elements/font.rb, line 6
def to_xml(xml)
  xml.font do
    xml.sz val: size
    xml.name val: name
    if styles
      xml.b if styles[:bold]
      xml.i if styles[:italic]
      xml.u if styles[:underline]
      styles[:color].to_xml("color", xml) if styles[:color]
    end
  end
end