Class: Multipart::StringParam
- Inherits:
-
Object
- Object
- Multipart::StringParam
- Defined in:
- lib/mls/models/document.rb
Overview
Formats a basic string key/value pair for inclusion with a multipart post
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) ⇒ StringParam
constructor
A new instance of StringParam.
- #to_multipart ⇒ Object
Constructor Details
#initialize(k, v) ⇒ StringParam
Returns a new instance of StringParam.
108 109 110 111 |
# File 'lib/mls/models/document.rb', line 108 def initialize(k, v) @k = k @v = v end |
Instance Attribute Details
#k ⇒ Object
Returns the value of attribute k.
106 107 108 |
# File 'lib/mls/models/document.rb', line 106 def k @k end |
#v ⇒ Object
Returns the value of attribute v.
106 107 108 |
# File 'lib/mls/models/document.rb', line 106 def v @v end |
Instance Method Details
#to_multipart ⇒ Object
113 114 115 |
# File 'lib/mls/models/document.rb', line 113 def to_multipart return "Content-Disposition: form-data; name=\"#{@k}\"\r\n\r\n#{v}\r\n" end |