title: Find more about a method from rubydoc: Gem::Dependency#pretty_print
body: <p>I am going through the source code of <a href="http://www.rubydoc.info/github/rubygems/rubygems/Gem/Dependency#pretty_print-instance_method" rel="nofollow noreferrer">Gem::Dependency#pretty_print</a> method. I don't understand what argument <code>q</code> is.</p>
  
  <pre><code>def pretty_print q # :nodoc:
    q.group 1, 'Gem::Dependency.new(', ')' do
      q.pp name
      q.text ','
      q.breakable
  
      q.pp requirement
  
      q.text ','
      q.breakable
  
      q.pp type
    end
  end
  </code></pre>
  
  <p>My question is, what do I do next from here. I searched <code>pretty_print</code> in their <a href="https://github.com/rubygems/rubygems.org" rel="nofollow noreferrer">Github repo</a>. They do not have any specs nor any function which uses this method. How can I know what it takes as input <code>q</code>? They have defined this method for several other objects.</p>
  
  <p><strong>Background and more details:</strong></p>
  
  <p>I am working on a script which reads Gemfile and shows each mentioned Gem with its description. Whenever I am going through the code of any new project which has a long list of Gems, it is difficult to go through each Gem's website and see what the Gem does.</p>
  
  <p>From rubydoc I found how Bundler parses the Gemfile. And came across this method: <a href="http://www.rubydoc.info/github/bundler/bundler/Bundler/Dsl#evaluate-class_method" rel="nofollow noreferrer">Bundler::Dsl#evaluate</a></p>
  
  <pre><code>def self.evaluate(gemfile, lockfile, unlock)
    builder = new
    builder.eval_gemfile(gemfile)
    builder.to_definition(lockfile, unlock)
  end
  </code></pre>
  
  <p>Here also it is not mentioned what should be passed as <code>gemfile, lockfile, unlock</code>. I searched for the method <code>evaluate</code> in their Git repo. I found the spec and I learned that I could pass <code>"Gemfile", nil, true</code> as the argument.</p>
  
  <p>I mentioned the flow so that if I can get any comments on it and improve.</p>