Returns a new array where all items’ keys are recursively converted to strings by calling {Nanoc3::ArrayExtensions#stringify_keys} or {Nanoc3::HashExtensions#stringify_keys}.
@return [Array] The converted array
# File lib/nanoc3/base/core_ext/array.rb, line 20 def stringify_keys inject([]) do |array, element| array + [ element.respond_to?(:stringify_keys) ? element.stringify_keys : element ] end end
Returns a new array where all items’ keys are recursively converted to symbols by calling {Nanoc3::ArrayExtensions#symbolize_keys} or {Nanoc3::HashExtensions#symbolize_keys}.
@return [Array] The converted array
# File lib/nanoc3/base/core_ext/array.rb, line 9 def symbolize_keys inject([]) do |array, element| array + [ element.respond_to?(:symbolize_keys) ? element.symbolize_keys : element ] end end
Generated with the Darkfish Rdoc Generator 2.