2 3 4 5 6 7 8 9 10
# File 'lib/lab42/core/hash.rb', line 2 def only *args args.inject Hash.new do | r, k | if has_key? k r.merge k => self[k] else r end end end