Class: Param
- Inherits:
-
Object
- Object
- Param
- Defined in:
- lib/captured/uploaders/imageshack_uploader.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.
99 100 101 102 |
# File 'lib/captured/uploaders/imageshack_uploader.rb', line 99 def initialize(k,v) @k = k @v = v end |
Instance Attribute Details
#k ⇒ Object
Returns the value of attribute k.
97 98 99 |
# File 'lib/captured/uploaders/imageshack_uploader.rb', line 97 def k @k end |
#v ⇒ Object
Returns the value of attribute v.
97 98 99 |
# File 'lib/captured/uploaders/imageshack_uploader.rb', line 97 def v @v end |
Instance Method Details
#to_multipart ⇒ Object
104 105 106 |
# File 'lib/captured/uploaders/imageshack_uploader.rb', line 104 def to_multipart return "Content-Disposition: form-data; name=\"#{CGI::escape(k)}\"\r\n\r\n#{v}\r\n" end |