# File lib/hashr/core_ext/ruby/hash.rb, line 2 def slice(*keep_keys) h = {} keep_keys.each { |key| h[key] = fetch(key) if key?(key) } h end