Created
August 16, 2011 09:41
-
-
Save krzysztofjablonski/1148737 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rack | |
module Test | |
module Utils # :nodoc: | |
private | |
def build_primitive_part(parameter_name, value) | |
unless value.is_a? Array | |
value = [value] | |
end | |
value.map do |v| | |
<<-EOF | |
--#{MULTIPART_BOUNDARY}\r | |
Content-Disposition: form-data; name="#{parameter_name}"\r | |
\r | |
#{v}\r | |
EOF | |
end.join | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment