Class: Flexirest::Multipart::StringParam
- Inherits:
-
Object
- Object
- Flexirest::Multipart::StringParam
- Defined in:
- lib/flexirest/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) ⇒ StringParam
constructor
A new instance of StringParam.
- #to_multipart ⇒ Object
Constructor Details
#initialize(k, v) ⇒ StringParam
Returns a new instance of StringParam.
54 55 56 57 |
# File 'lib/flexirest/multipart.rb', line 54 def initialize(k, v) @k = k @v = v end |
Instance Attribute Details
#k ⇒ Object
Returns the value of attribute k.
52 53 54 |
# File 'lib/flexirest/multipart.rb', line 52 def k @k end |
#v ⇒ Object
Returns the value of attribute v.
52 53 54 |
# File 'lib/flexirest/multipart.rb', line 52 def v @v end |
Instance Method Details
#to_multipart ⇒ Object
59 60 61 |
# File 'lib/flexirest/multipart.rb', line 59 def to_multipart return "Content-Disposition: form-data; name=\"#{k}\"\r\n\r\n#{v}\r\n" end |