Skip to content

Commit

Permalink
[ruby/optparse] [DOC] Add missing documents
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and hsbt committed Dec 25, 2023
1 parent 695e5dc commit 5cee3b9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/optparse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,10 @@ def self.inc(arg, default = nil)
default.to_i + 1
end
end

#
# See self.inc
#
def inc(*args)
self.class.inc(*args)
end
Expand Down Expand Up @@ -1167,6 +1171,9 @@ def add_officious # :nodoc:
def terminate(arg = nil)
self.class.terminate(arg)
end
#
# See #terminate.
#
def self.terminate(arg = nil)
throw :terminate, arg
end
Expand Down Expand Up @@ -1881,6 +1888,9 @@ def additional_message(typ, opt)
DidYouMean.formatter.message_for(all_candidates & checker.correct(opt))
end

#
# Return candidates for +word+.
#
def candidate(word)
list = []
case word
Expand Down Expand Up @@ -2123,6 +2133,7 @@ class ParseError < RuntimeError
# Reason which caused the error.
Reason = 'parse error'

# :nodoc:
def initialize(*args, additional: nil)
@additional = additional
@arg0, = args
Expand Down

0 comments on commit 5cee3b9

Please sign in to comment.