Class: Fog::ContainerInfra::HuaweiCloud::Base
- Inherits:
-
HuaweiCloud::Model
- Object
- Model
- HuaweiCloud::Model
- Fog::ContainerInfra::HuaweiCloud::Base
- Defined in:
- lib/fog/container_infra/huaweicloud/models/base.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from HuaweiCloud::Model
Instance Method Summary collapse
Methods inherited from HuaweiCloud::Model
#create, #destroy, #initialize, #save, #update
Constructor Details
This class inherits a constructor from Fog::HuaweiCloud::Model
Instance Method Details
#convert_update_params(params) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/fog/container_infra/huaweicloud/models/base.rb', line 7 def convert_update_params(params) params = params.map do |key, value| { "path" => "/#{key}", "op" => value ? "replace" : "remove" }.merge(value ? {"value" => value} : {}) end params.each {|k,v| params[k] = v.to_s.capitalize if [true, false].include?(v)} end |