Module: ConfigHelper

Included in:
Tddium::RepoConfig
Defined in:
lib/tddium/cli/config.rb

Instance Method Summary collapse

Instance Method Details

#hash_stringify_keys(h) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/tddium/cli/config.rb', line 6

def hash_stringify_keys(h)
  case h
  when Hash
    Hash[ h.map { |k, v| [ k.to_s, hash_stringify_keys(v) ] } ]
  when Enumerable
    h.map { |v| hash_stringify_keys(v) }
  else
    h
  end
end