title: Call a method on a Class object
body: <p>My task is to add a class method to the <code>Profile</code> class, called <code>get_all_profiles</code>, which:</p>
  
  <ul>
  <li><p>accepts a min and max for the birth year</p></li>
  <li><p>issues a <code>BETWEEN</code> SQL clause in a <code>WHERE</code> clause to locate <code>Profile</code>s with birth years that are between min year and max year</p></li>
  <li><p>defends itself against SQL injection when applying the parameters to
  the SQL clauses</p></li>
  <li><p>returns a collection of Profiles in ASC birth year order</p></li>
  </ul>
  
  <p>I think the implementation below is correct, but how I can call it on the class object (i.e. <code>Profile.get_all_profiles?(min, max)</code>)?</p>
  
  <pre><code>def get_all_profiles(start_year, end_year)
    Profile.where(:birth_year =&gt; start_year..end_year).order(:birth_year )
  end
  </code></pre>