title: Sorting an array of structs
body: <p>I have an array of structs called leaders.  The struct class looks like this, for contextual info:</p>
  
  <pre><code>class Leader &lt; Struct.new(:rank, :user); end
  </code></pre>
  
  <p>Two questions:</p>
  
  <ol>
  <li>How do I sort the array of structs by rank?</li>
  <li>How do I sort the array of structs by rank and by user.created_at?</li>
  </ol>