Class: OpenXml::Xlsx::Elements::BorderComponent
- Inherits:
-
Struct
- Object
- Struct
- OpenXml::Xlsx::Elements::BorderComponent
- Defined in:
- lib/openxml/xlsx/elements/border_component.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#style ⇒ Object
Returns the value of attribute style.
Instance Method Summary collapse
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color
4 5 6 |
# File 'lib/openxml/xlsx/elements/border_component.rb', line 4 def color @color end |
#style ⇒ Object
Returns the value of attribute style
4 5 6 |
# File 'lib/openxml/xlsx/elements/border_component.rb', line 4 def style @style end |
Instance Method Details
#to_xml(name, xml) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/openxml/xlsx/elements/border_component.rb', line 6 def to_xml(name, xml) if style && color xml.public_send(name, style: style) do color.to_xml("color", xml) end elsif style xml.public_send(name, style: style) else xml.public_send(name) end end |