diff options
| author | Randy Morgan <[email protected]> | 2012-10-14 10:35:20 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-10-14 10:35:20 +0900 |
| commit | 30c2de9bd3b25bb4559f1dbb08ee7672f0ce5fd3 (patch) | |
| tree | fc242e83e26d5c17250ab235292990057dee3a9e /lib/axlsx/stylesheet/styles.rb | |
| parent | 12b25df5e477ce83fb9e8a82dd0510c912cddeaa (diff) | |
| download | caxlsx-30c2de9bd3b25bb4559f1dbb08ee7672f0ce5fd3.tar.gz caxlsx-30c2de9bd3b25bb4559f1dbb08ee7672f0ce5fd3.zip | |
patched border parsing for Style#add_style to enforce color and style options
Diffstat (limited to 'lib/axlsx/stylesheet/styles.rb')
| -rw-r--r-- | lib/axlsx/stylesheet/styles.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/stylesheet/styles.rb b/lib/axlsx/stylesheet/styles.rb index 240d86fa..da5b277f 100644 --- a/lib/axlsx/stylesheet/styles.rb +++ b/lib/axlsx/stylesheet/styles.rb @@ -316,7 +316,7 @@ module Axlsx return unless options[:border] b_opts = options[:border] if b_opts.is_a?(Hash) - raise ArgumentError, (ERR_INVALID_BORDER_OPTIONS % b_opts) unless b_opts.values_at(:style, :color).size == 2 + raise ArgumentError, (ERR_INVALID_BORDER_OPTIONS % b_opts) unless b_opts.keys.include?(:style) && b_opts.keys.include?(:color) border = Border.new b_opts (b_opts[:edges] || [:left, :right, :top, :bottom]).each do |edge| b_options = { :name => edge, :style => b_opts[:style], :color => Color.new(:rgb => b_opts[:color]) } |
