Class: Multipart::Param
- Inherits:
-
Object
- Object
- Multipart::Param
- Defined in:
- lib/spout/helpers/send_file.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.
61 62 63 64 |
# File 'lib/spout/helpers/send_file.rb', line 61 def initialize(k, v) @k = k @v = v end |
Instance Attribute Details
#k ⇒ Object
Returns the value of attribute k.
60 61 62 |
# File 'lib/spout/helpers/send_file.rb', line 60 def k @k end |
#v ⇒ Object
Returns the value of attribute v.
60 61 62 |
# File 'lib/spout/helpers/send_file.rb', line 60 def v @v end |
Instance Method Details
#to_multipart ⇒ Object
66 67 68 |
# File 'lib/spout/helpers/send_file.rb', line 66 def to_multipart "Content-Disposition: form-data; name=\"#{k}\"\r\n\r\n#{v}\r\n" end |