I would like to return only part of hash as hash object.

 Example:
  h = { "a" => 100, "b" => 200, "c" => 300 }
  result = h.somemethod('a','c')
  # should result in { "a" => 100, "c" => 200}

Is this already build in Hash object or should I start and code it.


by
TheR
-- 
Posted via http://www.ruby-forum.com/.