Skip to content

Commit

Permalink
allow options to take array values, useful for --replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean le Roux committed Dec 20, 2011
1 parent f468ada commit 62aa213
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pdfkit/pdfkit.rb
Expand Up @@ -127,8 +127,12 @@ def normalize_arg(arg)


def normalize_value(value) def normalize_value(value)
case value case value
when TrueClass when TrueClass #ie, ==true, see http://www.ruby-doc.org/core-1.9.3/TrueClass.html
nil nil
when Hash
value.to_a.flatten.collect{|x| x.to_s}
when Array
value.flatten.collect{|x| x.to_s}
else else
value.to_s value.to_s
end end
Expand Down

0 comments on commit 62aa213

Please sign in to comment.