title: How to get first n elements from Hash in ruby?
body: <p>I have a Hash and i have sorted it using the values </p>
  
  <pre><code>@friends_comment_count.sort_by{|k,v| -v}
  </code></pre>
  
  <p>Now i only want to get hash of top five elements .. One way is to use a counter and break when its 5. 
   What is preferred way to do in ruby ? </p>
  
  <p>Thanks</p>