Class: Docusigner::Multipart::Parts::DataPart

Inherits:
StringIO
  • Object
show all
Defined in:
lib/docusigner/multipart.rb

Instance Method Summary collapse

Constructor Details

#initialize(boundary, data, opts = {}) ⇒ DataPart

Returns a new instance of DataPart.



36
37
38
39
40
41
42
43
# 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

Instance Method Details

#to_ioObject



44
45
46
# File 'lib/docusigner/multipart.rb', line 44

def to_io
  self
end