Class: ChefAPI::Multipart::ParamPart

Inherits:
Object
  • Object
show all
Defined in:
lib/chef-api/multipart.rb

Overview

A generic key => value part.

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ ParamPart

Returns a new instance of ParamPart.



87
88
89
# File 'lib/chef-api/multipart.rb', line 87

def initialize(name, value)
  @part = build(name, value)
end

Instance Method Details

#ioObject



91
92
93
# File 'lib/chef-api/multipart.rb', line 91

def io
  @io ||= StringIO.new(@part)
end

#sizeObject



95
96
97
# File 'lib/chef-api/multipart.rb', line 95

def size
  @part.bytesize
end