title: How can I conditionally, or contextually, load an interface of methods into a model from a Rails /lib?
body: <p>We have a set of reports that run out of <code>/lib</code>.  These have grown so voluminous that we now have written many methods that would count as helpers or other 'decorator-style' methods relating specifically to Reporting.  </p>
  
  <p>These additional methods live in the report, and look like:</p>
  
  <pre><code>class report
    def get_latest_credential_updated_date
      credentials.map(&amp;:updated_at).compact.max
    end
  
    def initialize 
      # set up stuff
    end
  end
  </code></pre>
  
  <ol>
  <li><p>Is there a way to load a module, or otherwise inject code to a Model when the reporting lib loads:</p>
  
  <pre><code>class Loan &lt; ActiveRecord::Base
    def get_latest_credential_updated_date
      credentials.map(&amp;:updated_at).compact.max
    end
  end
  </code></pre></li>
  <li><p>Is there a better pattern to represent this architecture?</p></li>
  </ol>