class OptionParser::List
Simple option list providing mapping from short and/or long option string to OptionParser::Switch and mapping from acceptable argument to matching pattern and converter pair. Also provides summary feature.
Public Class Methods
() → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1434
def initialize: () -> void
Just initializes all instance variables.
Public Instance Methods
(untyped t, ?untyped pat) { (*untyped) → untyped } → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1300
def accept: (untyped t, ?untyped pat) { (*untyped) -> untyped } -> untyped
See OptionParser.accept.
(*untyped args) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1326
def append: (*untyped args) -> untyped
Appends switch at the tail of the list, and associates short, long and negated long options. Arguments are:
switch-
OptionParser::Switchinstance to be inserted. short_opts-
Listof short style options. long_opts-
Listof long style options. nolong_opts-
Listof long style options with โno-โ prefix.
append(switch, short_opts, long_opts, nolong_opts)
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1331
def atype: () -> untyped
Map from acceptable argument types to pattern and converter pairs.
(untyped id, untyped opt, ?untyped icase, *untyped pat) { (*untyped) → untyped } → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1341
def complete: (untyped id, untyped opt, ?untyped icase, *untyped pat) { (*untyped) -> untyped } -> untyped
Searches list id for opt and the optional patterns for completion pat. If icase is true, the search is case insensitive. The result is returned or yielded if a block is given. If it isnโt found, nil is returned.
(*untyped args) { (*untyped) → untyped } → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1343
def compsys: (*untyped args) { (*untyped) -> untyped } -> untyped
() { (*untyped) → untyped } → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1351
def each_option: () { (*untyped) -> untyped } -> untyped
Iterates over each option, passing the option to the block.
(untyped id) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1358
def get_candidates: (untyped id) -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1363
def list: () -> untyped
List of all switches and summary string.
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1368
def long: () -> untyped
Map from long style option switches to actual switch objects.
(*untyped args) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1392
def prepend: (*untyped args) -> untyped
Inserts switch at the head of the list, and associates short, long and negated long options. Arguments are:
switch-
OptionParser::Switchinstance to be inserted. short_opts-
Listof short style options. long_opts-
Listof long style options. nolong_opts-
Listof long style options with โno-โ prefix.
prepend(switch, short_opts, long_opts, nolong_opts)
(untyped t) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1400
def reject: (untyped t) -> untyped
See OptionParser.reject.
(untyped id, untyped key) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1409
def search: (untyped id, untyped key) -> untyped
Searches key in id list. The result is returned or yielded if a block is given. If it isnโt found, nil is returned.
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1414
def short: () -> untyped
Map from short style option switches to actual switch objects.
(*untyped args) { (*untyped) → untyped } → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1424
def summarize: (*untyped args) { (*untyped) -> untyped } -> untyped
Creates the summary table, passing each line to the block (without newline). The arguments args are passed along to the summarize method which is called on every option.
(untyped sw, untyped sopts, untyped lopts, ?untyped nsw, ?untyped nlopts) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/optparse/0/optparse.rbs, line 1451
def update: (untyped sw, untyped sopts, untyped lopts, ?untyped nsw, ?untyped nlopts) -> untyped
Adds sw according to sopts, lopts and nlopts.
sw-
OptionParser::Switchinstance to be added.sopts: Short style option list.lopts: Long style option list.nlopts: Negated long style options list.