[ruby/optparse] [DOC] About return value of OptionParser#new

https://github.com/ruby/optparse/commit/59b9fd7ddc
This commit is contained in:
Nobuyoshi Nakada 2024-02-23 21:49:57 +09:00 committed by git
parent f0172fc7ee
commit 7da3f8dcd3

View File

@ -1216,9 +1216,9 @@ XXX
#
# Directs to reject specified class argument.
#
# +t+:: Argument class specifier, any object including Class.
# +type+:: Argument class specifier, any object including Class.
#
# reject(t)
# reject(type)
#
def reject(*args, &blk) top.reject(*args, &blk) end
#
@ -1347,6 +1347,9 @@ XXX
#
# Pushes a new List.
#
# If a block is given, yields +self+ and returns the result of the
# block, otherwise returns +self+.
#
def new
@stack.push(List.new)
if block_given?
@ -1570,6 +1573,12 @@ XXX
nolong
end
# ----
# Option definition phase methods
#
# These methods are used to define options, or to construct an
# OptionParser instance in other words.
# :call-seq:
# define(*params, &block)
#
@ -1645,6 +1654,13 @@ XXX
top.append(string, nil, nil)
end
# ----
# Arguments parse phase methods
#
# These methods parse +argv+, convert, and store the results by
# calling handlers. As these methods do not modify +self+, +self+
# can be frozen.
#
# Parses command line arguments +argv+ in order. When a block is given,
# each non-option argument is yielded. When optional +into+ keyword