key<~to_s> |
The parameter key. |
filename<~to_s> |
Name of the file for this parameter. |
content<~to_s> |
Content of the file for this parameter. |
# File lib/merb-core/test/helpers/multipart_request_helper.rb, line 30 def initialize(key, filename, content) @key = key @filename = filename @content = content end
The file parameter in a form suitable for a multipart request. |
# File lib/merb-core/test/helpers/multipart_request_helper.rb, line 39 def to_multipart return %(Content-Disposition: form-data; name="#{key}"; filename="#{filename}"\r\n) + "Content-Type: #{MIME::Types.type_for(@filename).first}\r\n\r\n" + content + "\r\n" end
Generated with the Darkfish Rdoc Generator 2.