Class: FatZebra::Request::Multipart::Param

Inherits:
Object
  • Object
show all
Includes:
Part
Defined in:
lib/fat_zebra/request/multipart/param.rb

Constant Summary

Constants included from Part

FatZebra::Request::Multipart::Part::LINE_BREAK

Instance Method Summary collapse

Methods included from Part

#boundary, #to_io

Constructor Details

#initialize(name, value) ⇒ Param

Returns a new instance of Param.



13
14
15
16
17
# File 'lib/fat_zebra/request/multipart/param.rb', line 13

def initialize(name, value)
  @name  = name
  @value = value
  @io    = StringIO.new(part)
end

Instance Method Details

#lengthObject



19
20
21
# File 'lib/fat_zebra/request/multipart/param.rb', line 19

def length
  part.bytesize
end