diff options
| author | Jurriaan Pruis <[email protected]> | 2014-04-04 11:41:19 +0200 |
|---|---|---|
| committer | Jurriaan Pruis <[email protected]> | 2014-04-04 11:41:19 +0200 |
| commit | d17b94d95d8b8b71afd8fba8b2c310425c1d0fae (patch) | |
| tree | cc4790617ad268f19f6710598a746e8200d479ce /lib/axlsx/stylesheet | |
| parent | 5ccab460b65f597398f1d8a1b2a5a83039b80a9e (diff) | |
| download | caxlsx-d17b94d95d8b8b71afd8fba8b2c310425c1d0fae.tar.gz caxlsx-d17b94d95d8b8b71afd8fba8b2c310425c1d0fae.zip | |
Use #booleanize
Diffstat (limited to 'lib/axlsx/stylesheet')
| -rw-r--r-- | lib/axlsx/stylesheet/font.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/axlsx/stylesheet/font.rb b/lib/axlsx/stylesheet/font.rb index 8770297d..baa1ef83 100644 --- a/lib/axlsx/stylesheet/font.rb +++ b/lib/axlsx/stylesheet/font.rb @@ -140,10 +140,7 @@ module Axlsx def to_xml_string(str = '') str << '<font>' instance_values.each do |k, v| - if v == true || v == false - v = v ? 1 : 0 - end - v.is_a?(Color) ? v.to_xml_string(str) : (str << ('<' << k.to_s << ' val="' << v.to_s << '"/>')) + v.is_a?(Color) ? v.to_xml_string(str) : (str << ('<' << k.to_s << ' val="' << Axlsx.booleanize(v).to_s << '"/>')) end str << '</font>' end |
