I’m a bit confused by the way that OptionParser works. In
the “Complete example” on
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?
Technical editing and writing, programming, and web development