diff options
| author | Weston Ganger <[email protected]> | 2022-10-22 22:39:10 -0700 |
|---|---|---|
| committer | Weston Ganger <[email protected]> | 2022-11-02 19:20:58 -0700 |
| commit | 168baec8c309960c2598b1dd82f2f6f16b462961 (patch) | |
| tree | b030001aa35f0f31bb2516428a481d78769fdf30 /lib/axlsx/stylesheet | |
| parent | 56fae454a3a4f01c2401321579726d7331407f0d (diff) | |
| download | caxlsx-168baec8c309960c2598b1dd82f2f6f16b462961.tar.gz caxlsx-168baec8c309960c2598b1dd82f2f6f16b462961.zip | |
Improve BorderCreator args
Diffstat (limited to 'lib/axlsx/stylesheet')
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index 1ddbb788..f6305fa9 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -231,8 +231,12 @@ module Axlsx raise ArgumentError, "Type must be one of [:xf, :dxf]" unless [:xf, :dxf].include?(options[:type] ) - if options[:border].is_a?(Hash) && options[:border][:edges] == :all - options[:border][:edges] = Axlsx::Border::EDGES + if options[:border].is_a?(Hash) + if options[:border][:edges] == :all + options[:border][:edges] = Axlsx::Border::EDGES + elsif options[:border][:edges] + options[:border][:edges] = options[:border][:edges].map(&:to_sym) ### normalize for style caching + end end if options[:type] == :xf |
