Class: Param

Inherits:
Object
  • Object
show all
Defined in:
lib/captured/uploaders/imageshack_uploader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#kObject

Returns the value of attribute k.



97
98
99
# File 'lib/captured/uploaders/imageshack_uploader.rb', line 97

def k
  @k
end

#vObject

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_multipartObject



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