Class: ChefAPI::Multipart::ParamPart

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

Overview

A generic key => value part.

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ ParamPart

Returns a new instance of ParamPart.



599
600
601
# File 'lib/chef-api/connection.rb', line 599

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

Instance Method Details

#ioObject



603
604
605
# File 'lib/chef-api/connection.rb', line 603

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

#sizeObject



607
608
609
# File 'lib/chef-api/connection.rb', line 607

def size
  @part.bytesize
end