372件ヒット
[1-100件を表示]
(0.127秒)
ライブラリ
- ビルトイン (12)
- delegate (24)
- getoptlong (192)
- mkmf (12)
-
net
/ http (24) - optparse (36)
-
rexml
/ document (24) - weakref (12)
-
webrick
/ httputils (24) - win32ole (12)
クラス
- Delegator (12)
- GetoptLong (192)
-
Net
:: HTTPResponse (24) - OptionParser (24)
-
REXML
:: Attribute (12) -
REXML
:: Element (12) - SimpleDelegator (12)
- Thread (12)
-
WEBrick
:: HTTPUtils :: FormData (24) - WIN32OLE (12)
- WeakRef (12)
モジュール
- Kernel (12)
-
OptionParser
:: Arguable (12)
キーワード
- [] (12)
-
_ _ getobj _ _ (36) -
create
_ makefile (12) - each (12)
-
each
_ option (12) - error (12)
- error? (12)
-
get
_ elements (12) -
get
_ option (12) - getopts (36)
- list (12)
-
ole
_ free (12) - ordering (12)
- ordering= (12)
- quiet (12)
- quiet= (12)
- quiet? (12)
-
read
_ body (24) -
set
_ error (12) - terminate (12)
- terminated? (12)
-
to
_ ary (12) -
to
_ string (12)
検索結果
先頭5件
-
GetoptLong
# get -> [String , String] (24121.0) -
ARGV から、次のオプションの名前と、もしあればその引数の組を取 得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名 (例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。
...は 2 つの値を返し、1 つ目の値がオプション名
(例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。
get と get_option は常にオプション名を正式名
で返します。与えられたオプションが引数を取らないときは、
空の文......わない場合は、エラーとなって、以下のいずれかの例外が発生し
ます。
* GetoptLong::AmbiguousOption
* GetoptLong::InvalidOption
* GetoptLong::MissingArgument
* GetoptLong::NeedlessArgument
加えて、静粛 (quiet) フラグが有効になっていない限り、......エラーメッ
セージを標準エラー出力に出力します。
例:
optname, optarg = option_parser.get... -
Delegator
# _ _ getobj _ _ -> object (15201.0) -
委譲先のオブジェクトを返します。
委譲先のオブジェクトを返します。
本メソッドは、サブクラスで再定義する必要があり、
デフォルトでは NotImplementedError が発生します。
@raise NotImplementedError サブクラスにて本メソッドが再定義されていない場合に発生します。 -
SimpleDelegator
# _ _ getobj _ _ -> object (15201.0) -
委譲先のオブジェクトを返します。
...委譲先のオブジェクトを返します。
@see Delegator#__getobj__... -
OptionParser
# getopts(*opts) -> Hash (12201.0) -
引数をパースした結果を、Hash として返します。
...rgv をパースします。そうでない場合は、
default_argv をパースします。
//emlist[][ruby]{
opt = OptionParser.new
params = opt.getopts(ARGV, "ab:", "foo", "bar:")
# params["a"] = true # -a
# params["b"] = "1" # -b1
# params["foo"] = true # --foo
# params["bar"] = "x" # -... -
OptionParser
# getopts(argv , *opts) -> Hash (12201.0) -
引数をパースした結果を、Hash として返します。
...rgv をパースします。そうでない場合は、
default_argv をパースします。
//emlist[][ruby]{
opt = OptionParser.new
params = opt.getopts(ARGV, "ab:", "foo", "bar:")
# params["a"] = true # -a
# params["b"] = "1" # -b1
# params["foo"] = true # --foo
# params["bar"] = "x" # -... -
OptionParser
:: Arguable # getopts(short _ opt , *long _ opt) -> Hash (12201.0) -
指定された short_opt や long_opt に応じて自身をパースし、結果を Hash として返します。
...r::ParseError のサブク
ラスの例外になります。
//emlist[t.rb][ruby]{
require 'optparse'
params = ARGV.getopts("ab:", "foo", "bar:", "bufsize:1024")
p params
//}
# 実行結果
$ ruby t.rb -b 1 --foo --bar xxx -- -a
{"bufsize"=>"1024", "a"=>false, "... -
WeakRef
# _ _ getobj _ _ -> object (12201.0) -
自身の参照先のオブジェクトを返します。
自身の参照先のオブジェクトを返します。
@raise WeakRef::RefError GC 済みのオブジェクトを参照した場合に発生します。
@see delegate -
GetoptLong
# get _ option -> [String , String] (12121.0) -
ARGV から、次のオプションの名前と、もしあればその引数の組を取 得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名 (例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。
...は 2 つの値を返し、1 つ目の値がオプション名
(例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。
get と get_option は常にオプション名を正式名
で返します。与えられたオプションが引数を取らないときは、
空の文......わない場合は、エラーとなって、以下のいずれかの例外が発生し
ます。
* GetoptLong::AmbiguousOption
* GetoptLong::InvalidOption
* GetoptLong::MissingArgument
* GetoptLong::NeedlessArgument
加えて、静粛 (quiet) フラグが有効になっていない限り、......エラーメッ
セージを標準エラー出力に出力します。
例:
optname, optarg = option_parser.get... -
REXML
:: Attribute # to _ string -> String (6114.0) -
"name='value'" という形式の文字列を返します。
..."name='value'" という形式の文字列を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}...