Module: Fog::Proxmox::Hash
- Defined in:
- lib/fog/proxmox/hash.rb
Overview
module Hash mixins
Class Method Summary collapse
Class Method Details
.flatten(hash) ⇒ Object
30 31 32 33 34 |
# File 'lib/fog/proxmox/hash.rb', line 30 def self.flatten(hash) filtered = hash.reject { |_key, value| value.nil? } a = filtered.to_a.collect { |item| item.join(': ') } a.join(',') end |
.stringify(hash) ⇒ Object
24 25 26 27 28 |
# File 'lib/fog/proxmox/hash.rb', line 24 def self.stringify(hash) filtered = hash.reject { |_key, value| value.nil? } a = filtered.to_a.collect { |item| item.join('=') } a.join(',') end |