Class: Protocol::Multipart::Part

Inherits:
Object
  • Object
show all
Defined in:
lib/protocol/multipart/part.rb

Overview

Represents a part in a multipart message.

Direct Known Subclasses

IOPart, Mixed, StringPart

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#headersObject

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