From: Rich Morin Date: 2006-10-06T04:03:31+09:00 Subject: OptionParser questions I'm a bit confused by the way that OptionParser works. In the "Complete example" on http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html I see opts = OptionParser.new do |opts| opts.banner = "Usage: example.rb [options]" ... It looks like the "opts" object is being handed to the block, as well as being returned as the result of the "new" method. Is this the case? Is this a common way of doing things? Are there any caveats that must be observed in this situation? -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development