Permalink
Browse files

allow options to take array values, useful for --replace

  • Loading branch information...
1 parent f468ada commit 62aa2131ec64f29b6d9ad30c85e3518f8ac45819 @elarex committed Dec 20, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/pdfkit/pdfkit.rb
View
@@ -127,8 +127,12 @@ def normalize_arg(arg)
def normalize_value(value)
case value
- when TrueClass
+ when TrueClass #ie, ==true, see http://www.ruby-doc.org/core-1.9.3/TrueClass.html
nil
+ when Hash
+ value.to_a.flatten.collect{|x| x.to_s}
+ when Array
+ value.flatten.collect{|x| x.to_s}
else
value.to_s
end

0 comments on commit 62aa213

Please sign in to comment.