Class: TencentCloud::Common::AbstractModel
- Inherits:
-
Object
- Object
- TencentCloud::Common::AbstractModel
- Defined in:
- lib/tencentcloud-sdk-common/models.rb
Overview
common model
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.format_params(prefix = nil, params) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tencentcloud-sdk-common/models.rb', line 11 def self.format_params(prefix = nil, params) d = {} case params when Hash params.each do |k, v| key = prefix ? "#{prefix}.#{k}" : k.to_s d.update(format_params(key, v)) end when Array params.each_with_index do |v, i| key = prefix ? "#{prefix}.#{i}" : i.to_s d.update(format_params(key, v)) end else d[prefix] = params end d end |
Instance Method Details
#serialize ⇒ Object
7 8 9 |
# File 'lib/tencentcloud-sdk-common/models.rb', line 7 def serialize flat(self) end |