title: Hiding a method from YARD (the right way)
body: <p>I am using <a href="http://yardoc.org" rel="nofollow noreferrer">YARD</a> to document one of my Ruby projects. I have certain methods that I do not want to be included in the documentation, things like <code>#inspect</code> and <code>#to_s</code> that you expect to exist and return a reasonable result.</p>
  <p>It is possible to hide these methods using the <code>@private</code> tag and the <code>yardoc --no-private</code> command-line option:</p>
  <pre><code># @private let's not document this
  def inspect; ...; end
  </code></pre>
  <p>However, the <a href="http://www.rubydoc.info/gems/yard/file/docs/Tags.md#private" rel="nofollow noreferrer">YARD documentation</a> on <code>@private</code> explicitly states:</p>
  <blockquote>
  <p><em>Note: This method is not recommended for hiding undocumented or “unimportant” methods. This tag should only be used to mark objects private when Ruby visibility rules cannot do so.</em></p>
  </blockquote>
  <p>If I use <code>@api private</code> instead, YARD (nicely) tags the methods with a <a href="/questions/tagged/private" class="post-tag" title="show questions tagged &#39;private&#39;" rel="tag">private</a> badge in the documentation, but still shows them.</p>
  <p>Is there a &quot;legal&quot; way to hide methods from YARD output?</p>