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
31 32 33 34 35 |
# File 'lib/fog/proxmox/hash.rb', line 31 def self.flatten(hash) filtered = hash.reject { |_key,value| value.to_s.empty? } a = filtered.to_a.collect { |item| item.join(': ') } a.join(',') end |
.stringify(hash) ⇒ Object
25 26 27 28 29 |
# File 'lib/fog/proxmox/hash.rb', line 25 def self.stringify(hash) filtered = hash.reject { |_key,value| value.to_s.empty? } a = filtered.to_a.collect { |item| item.join('=') } a.join(',') end |