Not use self in every class method and not use singleton model in ruby : <p>I'm having trouble with nice and beautiful code. Basically, if I define a class that won't be instantiated at all, I'd do something like this:</p>

<pre><code>class Foo
  def self.bar
    # Do something
  end
end
</code></pre>

<p>but this syntax bothers me (having to put <code>self.</code> in every method), so singleton solves my problem:</p>

<pre><code>class Foo
  class &lt;&lt; self
    def bar
      # Do something, but in better code
    end
  end
end
</code></pre>

<p>In both ways I can do <code>Foo.bar</code> and it'll do something, but the first one doesn't look good and in the second one I still don't get how singleton works exactly, so better be careful and not to use it.</p>

<p>So, in the end... What I'd like to ask: is there a way to do <code>Foo.bar</code> other than the mentioned above?</p>
