class Array
Public Instance Methods
clean()
click to toggle source
# File lib/gclouder/monkey_patches/array.rb, line 4 def clean uniq.delete_if(&:nil?) end
fetch_with_default(key, name, default)
click to toggle source
# File lib/gclouder/monkey_patches/array.rb, line 15 def fetch_with_default(key, name, default) results = find { |e| e[key] == name } results || default end
to_snake_keys()
click to toggle source
# File lib/gclouder/monkey_patches/array.rb, line 8 def to_snake_keys each_with_index do |v, i| self[i] = v.to_snake_keys if v.is_a?(Hash) end self end