Class: WebUnit::InputFile

Inherits:
Input show all
Defined in:
lib/webunit/params.rb

Instance Attribute Summary

Attributes inherited from Param

#name, #relations, #stat, #type, #value

Attributes inherited from HtmlElem

#array, #attrs, #children, #data, #name, #tag

Instance Method Summary collapse

Methods inherited from Input

#initialize, #inspect, #off, #on

Methods inherited from Param

#initialize, #update

Methods inherited from HtmlElem

#append, #extract, #find, #has?, #initialize, #inspect, #print, #readlink, #search

Constructor Details

This class inherits a constructor from WebUnit::Input

Instance Method Details

#multipart_query_data(boundary) ⇒ Object



307
308
309
310
311
312
313
314
315
316
317
# File 'lib/webunit/params.rb', line 307

def multipart_query_data( boundary)
  if @name and @value
    "--#{boundary}\n" +
    %!Content-Disposition: form-data; name="#{File.basename(@name)}"; filename="#{File.basename(@value)}"\n! +
    "Content-Type: text/plain\n" +
    "\n" +
    IO.readlines(@value).join('') + "\n"
  else
    nil
  end
end

#query_dataObject



303
304
305
# File 'lib/webunit/params.rb', line 303

def query_data
  nil
end