Class: ChefAPI::Multipart::ParamPart
- Inherits:
-
Object
- Object
- ChefAPI::Multipart::ParamPart
- Defined in:
- lib/chef-api/connection.rb
Overview
A generic key => value part.
Instance Method Summary collapse
-
#initialize(name, value) ⇒ ParamPart
constructor
A new instance of ParamPart.
- #io ⇒ Object
- #size ⇒ Object
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
#io ⇒ Object
603 604 605 |
# File 'lib/chef-api/connection.rb', line 603 def io @io ||= StringIO.new(@part) end |
#size ⇒ Object
607 608 609 |
# File 'lib/chef-api/connection.rb', line 607 def size @part.bytesize end |