Class: Multipart::Param

Inherits:
Object
  • Object
show all
Defined in:
lib/spout/helpers/send_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#kObject

Returns the value of attribute k.



60
61
62
# File 'lib/spout/helpers/send_file.rb', line 60

def k
  @k
end

#vObject

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_multipartObject



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