module Multipart::Post::Parts::Part
Public Class Methods
Source
# File lib/multipart/post/parts.rb, line 37 def self.file?(value) value.respond_to?(:content_type) && value.respond_to?(:original_filename) end
Source
# File lib/multipart/post/parts.rb, line 28 def self.new(boundary, name, value, headers = {}) headers ||= {} # avoid nil values if file?(value) FilePart.new(boundary, name, value, headers) else ParamPart.new(boundary, name, value, headers) end end