Module: Fog::Proxmox::Hash

Defined in:
lib/fog/proxmox/hash.rb

Overview

module Hash mixins

Class Method Summary collapse

Class Method Details

.stringify(hash) ⇒ Object


24
25
26
27
28
29
30
31
# File 'lib/fog/proxmox/hash.rb', line 24

def self.stringify(hash)
  return '' unless hash
  string = ''
  hash.each do |key, value|
    string += "#{key}=#{value}," if value
  end
  string.slice(0, string.length - 1) if string.length > 0
end