From 6d7ffaf10ee0568389854d41ad657a9e63c1703c Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 14 Oct 2012 10:35:47 +0900 Subject: Updated options parser to reject nil values --- lib/axlsx/util/options_parser.rb | 4 ++-- 1 file 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 -- cgit v1.2.3