From: Igor Nn Date: 2011-05-28T04:44:20+09:00 Subject: Hash .each and different action for each key Hello - I have a hash table of several items. What I would like to do is loop through the hash and do a different action based on each unique key. my_hash_table.each_pair do |k, v| # Call a method if a hash key == "a" # Call a different method if hash key == "b" # Call a third method if a hash key == "c" end I have been trying to implement this with "if" and "case", but the loop stops once the first argument is satisfied. Can you please point into the right direction of how to go about solving this problem. Thank you! -- Posted via http://www.ruby-forum.com/.