Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/cfer/provisioning/extensions.rb

Instance Method Summary collapse

Instance Method Details

#to_hash_recursiveObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/cfer/provisioning/extensions.rb', line 19

def to_hash_recursive
  result = self

  result.each_with_index do |value,i|
    case value
    when Hash
      result[i] = value.to_hash_recursive
    when Array
      result[i] = value.to_hash_recursive
    end
  end

  result
end