Module: Faraday::Parts::Part

Defined in:
lib/restforce/patches/parts.rb

Class Method Summary collapse

Class Method Details

.new(boundary, name, value, headers = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/restforce/patches/parts.rb', line 4

def self.new(boundary, name, value, headers = {})
  headers ||= {}
  if value.respond_to? :content_type
    FilePart.new(boundary, name, value)
  else
    ParamPart.new(boundary, name, value, headers)
  end
end