Class: Docusigner::Multipart::Parts::DocumentPart
- Inherits:
-
Object
- Object
- Docusigner::Multipart::Parts::DocumentPart
- Defined in:
- lib/docusigner/multipart.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Instance Method Summary collapse
-
#initialize(boundary, upload_io, opts = {}) ⇒ DocumentPart
constructor
A new instance of DocumentPart.
- #to_io ⇒ Object
Constructor Details
#initialize(boundary, upload_io, opts = {}) ⇒ DocumentPart
Returns a new instance of DocumentPart.
62 63 64 65 66 67 68 |
# File 'lib/docusigner/multipart.rb', line 62 def initialize(boundary, upload_io, opts = {}) @upload_io = upload_io head = build(boundary, @upload_io, opts) foot = "\r\n" @output_io = CompositeReadIO.new(StringIO.new(head), @upload_io.io, StringIO.new(foot)) @length = head.length + file_length + foot.length end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
61 62 63 |
# File 'lib/docusigner/multipart.rb', line 61 def length @length end |
Instance Method Details
#to_io ⇒ Object
69 70 71 |
# File 'lib/docusigner/multipart.rb', line 69 def to_io @output_io end |