class Docusigner::Multipart::Parts::DataPart
Public Class Methods
new(boundary, data, opts = {})
click to toggle source
Calls superclass method
# File lib/docusigner/multipart.rb, line 36 def initialize(boundary, data, opts = {}) @format = opts[:format] || :json @content_type = { :json => "application/json", :xml => "application/xml" }[@format] super(build(boundary, data, opts)) end
Public Instance Methods
to_io()
click to toggle source
# File lib/docusigner/multipart.rb, line 44 def to_io self end
Protected Instance Methods
build(boundary, value, opts = {})
click to toggle source
# File lib/docusigner/multipart.rb, line 48 def build(boundary, value, opts = {}) [ "--#{boundary}", "Content-Type: #{@content_type}", "Content-Disposition: form-data", "", value, "" ].join("\r\n") end