Class: Xlsx::Elements::BorderComponent
- Inherits:
-
Struct
- Object
- Struct
- Xlsx::Elements::BorderComponent
- Defined in:
- lib/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
3 4 5 |
# File 'lib/xlsx/elements/border_component.rb', line 3 def color @color end |
#style ⇒ Object
Returns the value of attribute style
3 4 5 |
# File 'lib/xlsx/elements/border_component.rb', line 3 def style @style end |
Instance Method Details
#to_xml(name, xml) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/xlsx/elements/border_component.rb', line 5 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 |