From: Phrogz Date: 2008-02-16T09:10:07+09:00 Subject: Re: Favorite Ruby idioms, shortcuts? On Feb 15, 4:36 pm, Serg Koren wrote: > As relatively new to Ruby, I'd be interested in seeing what people   > think are the best idioms for Ruby.  I'm trying to get used to doing   > things the "Ruby way" (no pun intended).  I'm interested in what you   > think are your favorite ways of doing things in Ruby.  Please include   > a short description or comments.   If I get enough of them I'll   > consolidate them and post them online. http://209.85.173.104/search?q=cache:6FhFfBVa9lIJ:rubygarden.org/Ruby/page/show/RubyIdioms+ruby+idioms&hl=en&ct=clnk&cd=2&gl=us&client=safari > PS - Anyone have a good explanation of why RDoc translates initialize   > methods as 'new'?   Yes I know you instantiate via:   X.new  but why   > does the method 'initialize'  get documented as method 'new'?   Seems   > a bit confusing for us newbies. I assume because initialize only exists to be called on instances after the 'new' for the class has created them. I have personally never called #initialize directly; it's always through new. I suppose the idea is that by documenting the method that you actually call, you know how to use the method. (Instead of causing new users to think that they should write f = Foo.new; f.initialize( bar, 42 )