In Files

Parent

Methods

Parts::ParamPart

Public Class Methods

new(boundary, name, value) click to toggle source
# File lib/parts.rb, line 22
def initialize(boundary, name, value)
  @part = build_part(boundary, name, value)
  @io = StringIO.new(@part)
end

Public Instance Methods

build_part(boundary, name, value) click to toggle source
# File lib/parts.rb, line 27
def build_part(boundary, name, value)
  part = ''
  part << "--#{boundary}\r\n"
  part << "Content-Disposition: form-data; name=\"#{name.to_s}\"\r\n"
  part << "\r\n"
  part << "#{value}\r\n"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.