Class: Videojuicer::OAuth::Multipart::Param

Inherits:
Object
  • Object
show all
Defined in:
lib/videojuicer/oauth/multipart_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value) ⇒ Param

Parameters

key<~to_s>

The parameter key.

value<~to_s>

The parameter value.



18
19
20
21
# File 'lib/videojuicer/oauth/multipart_helper.rb', line 18

def initialize(key, value)
  @key   = key
  @value = value
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



13
14
15
# File 'lib/videojuicer/oauth/multipart_helper.rb', line 13

def key
  @key
end

#valueObject

Returns the value of attribute value.



13
14
15
# File 'lib/videojuicer/oauth/multipart_helper.rb', line 13

def value
  @value
end

Instance Method Details

#to_multipartObject

Returns

String

The parameter in a form suitable for a multipart request.



25
26
27
# File 'lib/videojuicer/oauth/multipart_helper.rb', line 25

def to_multipart
  return %(Content-Disposition: form-data; name="#{key}"\r\n\r\n#{value}\r\n)
end