348件ヒット
[201-300件を表示]
(0.086秒)
別のキーワード
ライブラリ
- getoptlong (12)
-
irb
/ cmd / help (12) -
net
/ ftp (12) - optparse (180)
-
rubygems
/ command (12) - un (12)
- win32ole (108)
クラス
-
Gem
:: Command (12) - GetoptLong (12)
-
IRB
:: ExtendCommand :: Help (12) -
Net
:: FTP (12) - OptionParser (180)
- WIN32OLE (36)
-
WIN32OLE
_ METHOD (36) -
WIN32OLE
_ TYPE (36)
モジュール
- Kernel (12)
キーワード
- execute (12)
- helpcontext (24)
- helpfile (24)
- helpstring (24)
-
ole
_ method _ help (12) -
ole
_ obj _ help (12) -
ole
_ type (12) -
on
_ head (12) -
on
_ tail (12) - parse (24)
- parse! (12)
- separator (12)
-
show
_ help (12) - summarize (24)
-
summary
_ indent (12) -
summary
_ indent= (12) -
summary
_ width (12) -
summary
_ width= (12) -
to
_ a (12) -
to
_ s (12)
検索結果
先頭5件
-
OptionParser
# parse(argv , into: nil) -> [String] (6107.0) -
与えられた argv をパースします。 argv からオプションを取り除いたものを返します。
...返します。
OptionParser#permute と同様に振舞います。しかし、
環境変数に POSIXLY_CORRECT が設定されている場合は、
OptionParser#order と同様に振舞います。
@param argv パースしたい引数を文字列の配列で指定します。
@param args パー......スしたい引数を順に文字列として与えます。
@param into オプションを格納するハッシュを指定します。
指定したハッシュにはオプションの名前をキーとして、OptionParser#onに渡されたブロックの値が格納されます。......se OptionParser::ParseError パースに失敗した場合、発生します。
実際は OptionParser::ParseError のサブク
ラスになります。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.... -
OptionParser
# separator(sep) -> () (6107.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...サマリにオプションを区切るための文字列 sep を挿入します。
オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
サマリには on メソッドを呼んだ順にオプションが表示されるので、区切りを挿......す。
@param sep サマリの区切りを文字列で指定します。
//emlist[][ruby]{
require 'optparse'
opts = OptionParser.new
opts.banner = "Usage: example.rb [options]"
opts.separator ""
opts.separator "Specific options:"
opts.on("-r", "--require LIBRARY") do |lib|
options.libra......ry << lib
end
opts.separator ""
opts.separator "Common options:"
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
//}... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (6013.0) -
RI から Ruby のドキュメントを参照します。
...RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソ......irb(main):001:0> help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(pattern) -......> matchdata or nil
str.match(pattern, pos) -> matchdata or nil
...... -
OptionParser
# to _ s -> String (6008.0) -
サマリの文字列を返します。
.../emlist[例][ruby]{
require "optparse"
options = {}
opts = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
options[:verbose] = v
end
end
puts opts.help
# => Usage: example.rb [options]
# -v, --[no-]verbos... -
OptionParser
# on _ tail(*arg , &block) -> self (3031.0) -
オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。
...-help の説明をサマリの最後に表示したい時に便利です。
@param arg OptionParser#on と同様です。
@param block OptionParser#on と同様です。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--up......date")
opts.on_tail("-h", "--help")
end
puts opts.help
# => Usage: test [options]
# -i, --init
# -u, --update
# -h, --help
//}
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
opts.on_tail("--v......ersion", "Show version") do
puts OptionParser::Version.join('.')
exit
end
//}
@see OptionParser#on, OptionParser#on_head... -
OptionParser
# on _ head(*arg , &block) -> self (3019.0) -
オプションを取り扱うためのブロックを自身の持つリストの最初に登録します。
...す。
@param arg OptionParser#on と同様です。
@param block OptionParser#on と同様です。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
puts opts.help
# => Usage......: test [options]
# -i, --init
# -u, --update
# -h, --help
//}
@see OptionParser#on, OptionParser#on_tail... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (3019.0) -
サマリを指定された to へと加えていきます。
...ません。
@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。
@param width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サ......equire "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n",......" -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (3019.0) -
サマリを指定された to へと加えていきます。
...ません。
@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。
@param width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サ......equire "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n",......" -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}... -
OptionParser
# summary _ indent -> String (3019.0) -
サマリを表示する時のインデントを文字列で返します。
...re "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_indent = " "
opts.s......ummary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}...