Module: Net::HTTP::Post::Part

Included in:
EpiloguePart, FilePart, ParamPart
Defined in:
lib/net/http/post/multipart.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(boundary, name, value) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/net/http/post/multipart.rb', line 16

def self.new(boundary, name, value)
  if value.respond_to? :content_type
    FilePart.new(boundary, name, value)
  else
    ParamPart.new(boundary, name, value)
  end
end

Instance Method Details

#lengthObject



24
25
26
# File 'lib/net/http/post/multipart.rb', line 24

def length
  @part.length
end

#to_ioObject



28
29
30
# File 'lib/net/http/post/multipart.rb', line 28

def to_io
  @io
end