rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

Options -r and -o should be combinable

Open zzak opened this issue 12 years ago • 3 comments

This module should explain it:

# When using the 'r' and 'o' option together, you should be able to combine the
# flags into one command to generate ri documentation for a given output
# destination. Such as:
#
# rdoc -ro mydocs lib/mylib.rb
#
module MyLib
  def yaknow
    puts "oh, totally"
  end
end

When you try: rdoc -ro mydocs lib/mylib.rb what you actually see is:

invalid options: -ro
(invalid options are ignored)

zzak avatar May 01 '13 03:05 zzak

I'm unsure if this is an RDoc bug or not. I don't see anything in my OptionParser object that would cause this to happen but I can reproduce it.

I can't create a reproduction outside of RDoc::Options though, so I'm moving this to the future.

drbrain avatar Jun 28 '13 05:06 drbrain

To add, although the error is displayed, the generation of the output directory and the ri documentation for the snippet works fine.

kgrz avatar Sep 12 '13 08:09 kgrz

Nope. Wrong conclusion. Ignore the above comment. Using -ro won't generate the ri documentation.

kgrz avatar Sep 12 '13 08:09 kgrz