Class: Flexirest::Multipart::StringParam

Inherits:
Object
  • Object
show all
Defined in:
lib/flexirest/multipart.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#kObject

Returns the value of attribute k.



52
53
54
# File 'lib/flexirest/multipart.rb', line 52

def k
  @k
end

#vObject

Returns the value of attribute v.



52
53
54
# File 'lib/flexirest/multipart.rb', line 52

def v
  @v
end

Instance Method Details

#to_multipartObject



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