diff options
| author | Randy Morgan <[email protected]> | 2012-10-14 10:35:47 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-10-14 10:35:47 +0900 |
| commit | 6d7ffaf10ee0568389854d41ad657a9e63c1703c (patch) | |
| tree | fb3690946288ef8cc23be3172d85e73a3f3101a9 /lib/axlsx/util/options_parser.rb | |
| parent | 30c2de9bd3b25bb4559f1dbb08ee7672f0ce5fd3 (diff) | |
| download | caxlsx-6d7ffaf10ee0568389854d41ad657a9e63c1703c.tar.gz caxlsx-6d7ffaf10ee0568389854d41ad657a9e63c1703c.zip | |
Updated options parser to reject nil values
Diffstat (limited to 'lib/axlsx/util/options_parser.rb')
| -rw-r--r-- | lib/axlsx/util/options_parser.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/util/options_parser.rb b/lib/axlsx/util/options_parser.rb index c4c43fa2..b6332275 100644 --- a/lib/axlsx/util/options_parser.rb +++ b/lib/axlsx/util/options_parser.rb @@ -1,8 +1,8 @@ module Axlsx module OptionsParser def parse_options(options={}) - options.each do |o| - self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + options.each do |key, value| + self.send("#{key}=", value) if self.respond_to?("#{key}=") && value != nil end end end |
