diff options
Diffstat (limited to 'lib/axlsx/stylesheet/styles.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index e518d21e..d9c5683a 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -370,7 +370,7 @@ module Axlsx if options[:border].is_a?(Integer) if options[:border] >= borders.size - raise ArgumentError, (ERR_INVALID_BORDER_ID % options[:border]) + raise ArgumentError, format(ERR_INVALID_BORDER_ID, options[:border]) end if options[:type] == :dxf @@ -380,9 +380,9 @@ module Axlsx end end - validate_border_hash = ->(val) { - if !(val.key?(:style) && val.key?(:color)) - raise ArgumentError, (ERR_INVALID_BORDER_OPTIONS % options[:border]) + validate_border_hash = lambda { |val| + unless val.key?(:style) && val.key?(:color) + raise ArgumentError, format(ERR_INVALID_BORDER_OPTIONS, options[:border]) end } @@ -439,7 +439,7 @@ module Axlsx next end - if !edge_b_opts.empty? + unless edge_b_opts.empty? if base_border_opts.empty? validate_border_hash.call(edge_b_opts) end |
