Class: Hurley::Multipart::EpiloguePart

Inherits:
Object
  • Object
show all
Includes:
Part
Defined in:
lib/hurley/multipart.rb

Overview

Represents the epilogue or closing boundary.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Part

file?, new, #to_io

Constructor Details

#initialize(boundary) ⇒ EpiloguePart

Returns a new instance of EpiloguePart.



170
171
172
173
174
# File 'lib/hurley/multipart.rb', line 170

def initialize(boundary)
  @part = "--#{boundary}--\r\n\r\n"
  @io = StringIO.new(@part)
  @length = @part.bytesize
end

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



168
169
170
# File 'lib/hurley/multipart.rb', line 168

def length
  @length
end