class Hash

Public Instance Methods

[](*fkeys) click to toggle source
# File lib/ext/hash.rb, line 88
def [](*fkeys)
  fkeys.map { |key| mlookup(key) || mfetch(key.sym) { mfetch(key.to_s) { mfetch(ki(key).sym) { mfetch(ki(key).to_s) { mdef(key) } } } } }.sequester!
end
Also aliased as: mlookup
denil() click to toggle source
# File lib/ext/hash.rb, line 98
def denil
  reject{ |k, v| k.nil? || v.nil? }
end
mlookup(*fkeys)
Alias for: []
sym(recurse=false) click to toggle source
# File lib/ext/hash.rb, line 92
def sym(recurse=false)
  each.with_object({}) do |(key, value), o|
    o[key.sym] = recurse ? value.sym : value
  end
end