title: In Ruby, how do I define a class constructor method with the same name as the class?
body: <p>I'm not sure where I have seen this, or if I just think I have seen it, but I would like to be able to call a method that creates an instance of a class with the same name. So, instead of:</p>
  
  <pre><code># The class is called 'Vector3', for example:
  Vector3.new(x,y,z)
  </code></pre>
  
  <p>I would like to have an eponymous method that instantiates the class, like so:</p>
  
  <pre><code>Vector3(x,y,z) #&lt;- returns instance of Vector3 class
  </code></pre>
  
  <p>How would you define that in Ruby?</p>