Sha256: 057a03f48520c066620dfae7a323c353a423f470cce877037c7890f297d5f884

Contents?: true

Size: 602 Bytes

Versions: 13

Compression:

Stored size: 602 Bytes

Contents

module CiCd
	module Builder

		# ---------------------------------------------------------------------------------------------------------------
		def downcaseKey(hash,key)
			hash[key.to_s.downcase.to_sym] = hash[key]
			hash.delete(key)
			hash
		end

		# ---------------------------------------------------------------------------------------------------------------
		def downcaseHashKeys(hash)
			down = {}
			hash.each{|k,v|
				if v.is_a?(Hash)
					v = downcaseHashKeys(v)
				end
				if k.to_s.match(/[A-Z]/)
					k = k.to_s.downcase.to_sym
				end
				down[k] = v
			}
			down
		end

	end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
cicd-builder-0.9.23 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.22 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.21 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.20 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.19 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.18 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.17 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.16 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.15 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.14 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.13 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.11 lib/cicd/builder/mixlib/utils.rb
cicd-builder-0.9.10 lib/cicd/builder/mixlib/utils.rb