Class: Rbkb::Http::MultipartFormParams
- Inherits:
-
Parameters
- Object
- Array
- Parameters
- Rbkb::Http::MultipartFormParams
- Defined in:
- lib/rbkb/http/parameters.rb
Overview
The MultipartFormParams class is for Parameters in POST data when using the multipart/form-data content type. This is often used for file uploads.
Instance Method Summary collapse
Methods inherited from Parameters
#delete_param, #get_all, #get_all_values_for, #get_param, #get_value_for, #initialize, parse, #set_all_for, #set_param
Methods included from CommonInterface
Methods inherited from Array
Constructor Details
This class inherits a constructor from Rbkb::Http::Parameters
Instance Method Details
#capture(str) ⇒ Object
94 95 96 97 98 99 100 101 |
# File 'lib/rbkb/http/parameters.rb', line 94 def capture(str) raise "arg 0 must be a string" unless String === str str.split('&').each do |p| var,val = p.split('=',2) self << [var,val] end return self end |
#to_raw ⇒ Object
90 91 92 |
# File 'lib/rbkb/http/parameters.rb', line 90 def to_raw self.map {|k,v| "#{k}=#{v}"}.join('&') end |