diff options
| author | Evan Hallmark <[email protected]> | 2016-11-07 11:19:12 -0800 |
|---|---|---|
| committer | Evan Hallmark <[email protected]> | 2016-11-07 11:19:12 -0800 |
| commit | 31a4e6cb13d139c7d54038ecb204b4ae1b152c61 (patch) | |
| tree | 797d1203f0175ce71ea9169d9c3281f147cc8ee4 /lib/axlsx/stylesheet/num_fmt.rb | |
| parent | 731639b7d8871e79e96167b64c83f55e06bf78f6 (diff) | |
| download | caxlsx-31a4e6cb13d139c7d54038ecb204b4ae1b152c61.tar.gz caxlsx-31a4e6cb13d139c7d54038ecb204b4ae1b152c61.zip | |
Override NumFmt serialized_attributes to ovid removing underscores
Diffstat (limited to 'lib/axlsx/stylesheet/num_fmt.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/num_fmt.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/axlsx/stylesheet/num_fmt.rb b/lib/axlsx/stylesheet/num_fmt.rb index 8276ba18..1072d18a 100644 --- a/lib/axlsx/stylesheet/num_fmt.rb +++ b/lib/axlsx/stylesheet/num_fmt.rb @@ -73,5 +73,14 @@ module Axlsx serialized_tag('numFmt', str) end + # Override to avoid removing underscores + def serialized_attributes(str = '', additional_attributes = {}) + attributes = declared_attributes.merge! additional_attributes + attributes.each do |key, value| + str << "#{Axlsx.camel(key, false)}=\"#{Axlsx.booleanize(value)}\" " + end + str + end + end end |
