Class: ChefAPI::Multipart::ParamPart
- Inherits:
-
Object
- Object
- ChefAPI::Multipart::ParamPart
- Defined in:
- lib/chef-api/multipart.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.
87 88 89 |
# File 'lib/chef-api/multipart.rb', line 87 def initialize(name, value) @part = build(name, value) end |
Instance Method Details
#io ⇒ Object
91 92 93 |
# File 'lib/chef-api/multipart.rb', line 91 def io @io ||= StringIO.new(@part) end |
#size ⇒ Object
95 96 97 |
# File 'lib/chef-api/multipart.rb', line 95 def size @part.bytesize end |