Sha256: 91f847431e048af319dbc20a7f5fe3d05abf43599931df554a46fd3f6efcdf4c
Contents?: true
Size: 496 Bytes
Versions: 1
Compression:
Stored size: 496 Bytes
Contents
module ConfigBuilder # Utility functions. module Util # Recursively cast hash keys to symbols # # @param hash [Hash] A hash of keys and values. # # @return [Hash] The same hash, but with all keys transformed to symbols. def self.symbolize(hash) transformed_data = hash.map do |k, v| v = symbolize(v) if v.is_a?(Hash) [k.to_sym, v] end Hash[transformed_data] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-config_builder-1.3.0 | lib/config_builder/util.rb |