るりまサーチ

最速Rubyリファレンスマニュアル検索!
66件ヒット [1-66件を表示] (0.082秒)
トップページ > クエリ:-[x] > クエリ:option_parser[x]

別のキーワード

  1. option linger
  2. option int
  3. option bool
  4. getoptlong get_option
  5. getoptlong each_option

ライブラリ

クラス

キーワード

検索結果

RDoc::Options#option_parser -> OptionParser | nil (18201.0)

コマンドライン引数の解析のための OptionParser オブジェクトを返し ます。

コマンドライン引数の解析のための OptionParser オブジェクトを返し
ます。

GetoptLong#get -> [String, String] (122.0)

ARGV から、次のオプションの名前と、もしあればその引数の組を取 得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名 (例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

...名前と、もしあればその引数の組を取
得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名
(例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

get と get_option は常にオプション名を正式名
で返します...
...biguousOption
* GetoptLong::InvalidOption
* GetoptLong::MissingArgument
* GetoptLong::NeedlessArgument

加えて、静粛 (quiet) フラグが有効になっていない限り、エラーメッ
セージを標準エラー出力に出力します。

例:
optname, optarg = option_parser.get...

GetoptLong#get_option -> [String, String] (122.0)

ARGV から、次のオプションの名前と、もしあればその引数の組を取 得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名 (例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

...名前と、もしあればその引数の組を取
得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名
(例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

get と get_option は常にオプション名を正式名
で返します...
...biguousOption
* GetoptLong::InvalidOption
* GetoptLong::MissingArgument
* GetoptLong::NeedlessArgument

加えて、静粛 (quiet) フラグが有効になっていない限り、エラーメッ
セージを標準エラー出力に出力します。

例:
optname, optarg = option_parser.get...

OptionParser#reject(klass) -> () (118.0)

OptionParser#accept で登録したクラスとブロックを 自身から削除します。

...ラスを指定します。

//emlist[例][ruby]{
require "optparse"
require "time"

def parse(option_parser)
option_parser
.on("-t", "--time [TIME]", Time) do |time|
p time.class
end
option_parser
.parse(ARGV)
end

opts = OptionParser.new
opts.accept(Time) do |s,|
begin
Time.parse(s)...

OptionParser.reject(klass) -> () (118.0)

OptionParser.accept メソッドで登録したブロックを削除します。

...クトを指定します。

//emlist[例][ruby]{
require "optparse"
require "time"

def parse(option_parser)
option_parser
.on("-t", "--time [TIME]", Time) do |time|
p time.class
end
option_parser
.parse(ARGV)
end

OptionParser.accept(Time) do |s,|
begin
Time.parse(s) if s
rescue...

絞り込み条件を変える

RDoc::Options (12.0)

rdoc コマンドのオプションを解析するためのクラスです。

... --format が含まれていた場合、RDoc はジェネ
レータ独自のオプションを解析するために setup_options メソッドを呼び出し
ます。カスタムオプションを指定する場合は --format オプションは必ず指定
する必要があります。rdoc --help...
...lass RDoc::Generator::Spellcheck
RDoc::RDoc.add_generator self

def self.setup_options rdoc_options
op = rdoc_options.option_parser

op.on('--spell-dictionary DICTIONARY',
RDoc::Options::Path) do |dictionary|
# RDoc::Options に spell_dictionary アクセサ...