changes done as per ruby style guide

1) Hash#has_key? has been depreciated in favour of Hash#key?
2) &block is unused variable , it would be better to name it starting with _.