Class: Array
Constant Summary
Constants included from Hashable
Instance Method Summary collapse
-
#to_deep_hash ⇒ Object
(also: #to_dh)
Return recursively hash representation of the given array.
Instance Method Details
#to_deep_hash ⇒ Object Also known as: to_dh
Return recursively hash representation of the given array
8 9 10 11 12 13 14 |
# File 'lib/hashable/array.rb', line 8 def to_deep_hash new_array = [] self.each_index do |index| new_array[index] = deeply_to_hash(self[index]) end new_array end |