Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6250153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:22:11+00:00 2026-05-24T13:22:11+00:00

I have been unable to locate any documentation for parse! , a very commonly

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:22:12+00:00Added an answer on May 24, 2026 at 1:22 pm

    I use Rubydoc.info for most of my documentation. The docs for OptParse explain parse pretty clearly I thought:

    Parses command line arguments argv in order when environment variable POSIXLY_CORRECT is set, and in permutation mode otherwise.

    If you check the source link for that method you’ll see it’s implemented using parse!:

    def parse(*argv)
      argv = argv[0].dup if argv.size == 1 and Array === argv[0]
      parse!(argv)
    end
    

    And looking at parse! will tell you even more.

    Regarding missing or deleted pieces of information: Most Ruby docs are generated by RDoc, or YARD, based on what is in the source code so, missing information is usually the fault of the author of the code.

    Some people are too busy to document correctly, either ignoring it entirely, or not knowing what to document. We, as users of the code, can help though by submitting changes to the source that implements better documentation. I’ve done it many times on different projects, when I found something confusing or wrong.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been unable to find any documentation on the .build method in Rails
I have been unable to locate any information on compatibility with Visual Studio 2003
I have been unable to find any decent documentation on this function. The code
I have been unable to find any documentation on properly closing database connections in
I have need to return multiple results from a subquery and have been unable
For about 2 weeks now, I have been unable to run any UnitTests (built
I have been unable to receive UDP multicast under VxWorks 5.5. I've joined the
I have been unable to trigger an onselect event handler attached to a <div>
So I have been intrigued by the ?? operator, but have still been unable
I've read a number of articles about UDP packet sizes but have been unable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.