Class: Protocol::Multipart::Part
- Inherits:
-
Object
- Object
- Protocol::Multipart::Part
- Defined in:
- lib/protocol/multipart/part.rb
Overview
Represents a part in a multipart message.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#headers ⇒ Object
The headers associated with this part.
Instance Method Summary collapse
-
#call(writable, boundary = nil) ⇒ Object
Writes the part to the writable body.
-
#initialize(headers = {}) ⇒ Part
constructor
Initialize a new part with the given headers.
-
#The headers as name/value pairs.=(headersasname/valuepairs. = (value)) ⇒ Object
The headers associated with this part.
Constructor Details
#initialize(headers = {}) ⇒ Part
Initialize a new part with the given headers.
14 15 16 |
# File 'lib/protocol/multipart/part.rb', line 14 def initialize(headers = {}) @headers = headers end |
Instance Attribute Details
#headers ⇒ Object
The headers associated with this part.
20 21 22 |
# File 'lib/protocol/multipart/part.rb', line 20 def headers @headers end |
Instance Method Details
#call(writable, boundary = nil) ⇒ Object
Writes the part to the writable body.
26 27 |
# File 'lib/protocol/multipart/part.rb', line 26 def call(writable, boundary = nil) end |
#The headers as name/value pairs.=(headersasname/valuepairs. = (value)) ⇒ Object
The headers associated with this part.
20 |
# File 'lib/protocol/multipart/part.rb', line 20 attr_accessor :headers |