Module: Parts::Part
- Included in:
- EpiloguePart, FilePart, ParamPart
- Defined in:
- lib/tent-client/multipart-post/parts.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.new(boundary, name, value, options = {}) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/tent-client/multipart-post/parts.rb', line 7 def self.new(boundary, name, value, = {}) if value.respond_to?(:content_type) FilePart.new(boundary, name, value, ) else ParamPart.new(boundary, name, value, ) end end |
Instance Method Details
#length ⇒ Object
15 16 17 |
# File 'lib/tent-client/multipart-post/parts.rb', line 15 def length @part.length end |
#to_io ⇒ Object
19 20 21 |
# File 'lib/tent-client/multipart-post/parts.rb', line 19 def to_io @io end |