I have been unable to locate any documentation for parse!
, a very commonly used instance method for the OptionParser
class from Ruby's standard distribution.
I have seen parse!
used in the examples at the top of the documentation for the OptionParse class. However, I am looking for documentation specific to this method, documentation that describes what exactly the method does. For example, the documentation should, among other things, give a clue as to why the method name ends in a bang (presumably this method removes the options from ARGV). It might also describe whether I should expect anything useful to be returned from parse!
(number of options parsed?).
I have tried reading the official documentation for the OptionParse
class and for all of the subclasses listed at the top of that class. I also consulted the relevant section Programming Ruby (the "pickaxe book").
I am not asking what parse!
does; I have a decent (if imperfect) sense of it from reading other StackOverlow threads. I am looking to improve my ability to make sense of Ruby documentation. I am more accustomed to Perl/CPAN documentation. When I am dealing with Ruby documentaiton, even for standard distribution modules, I feel very lost. It's as though someone has deleted or relocated key bits of information. Sometimes I come across a location where I think the documentation for a key method would be, and find I am left to simply examine the source code for said method. I wonder if perhaps I am just not used to how information is organized in Ruby. Maybe this can be a good lesson for me.