Class: RouteNGN::HTTP::Multipart::Param
- Inherits:
-
Object
- Object
- RouteNGN::HTTP::Multipart::Param
- Defined in:
- lib/routengn/http/multipart.rb
Instance Attribute Summary collapse
-
#k ⇒ Object
Returns the value of attribute k.
-
#v ⇒ Object
Returns the value of attribute v.
Instance Method Summary collapse
-
#initialize(k, v) ⇒ Param
constructor
A new instance of Param.
- #to_multipart ⇒ Object
Constructor Details
#initialize(k, v) ⇒ Param
Returns a new instance of Param.
20 21 22 23 |
# File 'lib/routengn/http/multipart.rb', line 20 def initialize( k, v ) @k = k @v = v end |
Instance Attribute Details
#k ⇒ Object
Returns the value of attribute k.
18 19 20 |
# File 'lib/routengn/http/multipart.rb', line 18 def k @k end |
#v ⇒ Object
Returns the value of attribute v.
18 19 20 |
# File 'lib/routengn/http/multipart.rb', line 18 def v @v end |
Instance Method Details
#to_multipart ⇒ Object
25 26 27 28 29 |
# File 'lib/routengn/http/multipart.rb', line 25 def to_multipart #return "Content-Disposition: form-data; name=\"#{CGI::escape(k)}\"\r\n\r\n#{v}\r\n" # Don't escape mine... return "Content-Disposition: form-data; name=\"#{k}\"\r\n\r\n#{v}\r\n" end |