Class: OpenXml::Xlsx::Elements::Font
- Inherits:
-
Struct
- Object
- Struct
- OpenXml::Xlsx::Elements::Font
- Defined in:
- lib/openxml/xlsx/elements/font.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#size ⇒ Object
Returns the value of attribute size.
-
#styles ⇒ Object
Returns the value of attribute styles.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
4 5 6 |
# File 'lib/openxml/xlsx/elements/font.rb', line 4 def name @name end |
#size ⇒ Object
Returns the value of attribute size
4 5 6 |
# File 'lib/openxml/xlsx/elements/font.rb', line 4 def size @size end |
#styles ⇒ Object
Returns the value of attribute styles
4 5 6 |
# File 'lib/openxml/xlsx/elements/font.rb', line 4 def styles @styles end |
Instance Method Details
#to_xml(xml) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# 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 |