Class: Translatomatic::HTTPRequest::Param

Inherits:
Object
  • Object
show all
Defined in:
lib/translatomatic/http_request.rb

Overview

Formats a basic string key/value pair for a multipart post

Direct Known Subclasses

FileParam

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key.



88
89
90
# File 'lib/translatomatic/http_request.rb', line 88

def key
  @key
end

#valueObject

Returns the value of attribute value.



88
89
90
# File 'lib/translatomatic/http_request.rb', line 88

def value
  @value
end

Instance Method Details

#to_sString

Returns Representation of this parameter as it appears within a multipart post request.

Returns:

  • (String)

    Representation of this parameter as it appears within a multipart post request.



92
93
94
# File 'lib/translatomatic/http_request.rb', line 92

def to_s
  return header(header_data) + "\r\n#{value}\r\n"
end