title: How do I get a list of files that have been `required` in Ruby?
body: <p>This is purely an experiment, but I'm wondering if it's possible to get a list of the <code>require</code>'d gems at runtime via some kind of metaprogramming. For example, say I have:</p>
  
  <pre><code>require 'rubygems'
  require 'sinatra'
  require 'nokogiri'
  
  # don't know what to do here
  </code></pre>
  
  <p>How can I print out the following at runtime?</p>
  
  <pre><code>this app needs rubygems, sinatra, nokogiri
  </code></pre>