360件ヒット
[201-300件を表示]
(0.071秒)
別のキーワード
ライブラリ
- getoptlong (12)
-
irb
/ cmd / help (12) -
net
/ ftp (12) - optparse (180)
-
rubygems
/ command (12) - un (12)
- win32ole (120)
クラス
-
Gem
:: Command (12) - GetoptLong (12)
-
IRB
:: ExtendCommand :: Help (12) -
Net
:: FTP (12) - OptionParser (180)
- WIN32OLE (48)
-
WIN32OLE
_ METHOD (36) -
WIN32OLE
_ TYPE (36)
モジュール
- Kernel (12)
キーワード
- execute (12)
- helpcontext (24)
- helpfile (24)
- helpstring (24)
-
ole
_ method (12) -
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
# on _ head(*arg , &block) -> self - OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () - OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () - OptionParser
# summary _ indent -> String - OptionParser
# summary _ indent=(indent)
-
OptionParser
# on _ head(*arg , &block) -> self (19.0) -
オプションを取り扱うためのブロックを自身の持つリストの最初に登録します。
...][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) -> () (19.0) -
サマリを指定された to へと加えていきます。
...n("-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| . . . } -> () (19.0) -
サマリを指定された to へと加えていきます。
...n("-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 (19.0) -
サマリを表示する時のインデントを文字列で返します。
....on_tail("-h", "--help")
end
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_indent = " "
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}... -
OptionParser
# summary _ indent=(indent) (19.0) -
サマリを表示する時のインデントを文字列で指定します。
..."-h", "--help")
end
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_indent = " " # => " "
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}... -
OptionParser
# summary _ width -> Integer (19.0) -
サマリを表示するときの幅を整数で返します。
..."--help")
end
opts.summary_width # => 32
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_width = 8
opts.summary_width # =>8
opts.summarize
# => [" -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]... -
OptionParser
# summary _ width=(width) (19.0) -
サマリを表示するときの幅を整数で指定します。
...help")
end
opts.summary_width # => 32
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_width = 8 # => 8
opts.summary_width # => 8
opts.summarize
# => [" -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help... -
GetoptLong
# set _ options(*arguments) -> self (13.0) -
あなたのプログラムで、認識させたいオプションをセットします。 個々のオプションは、オプション名と引数のフラグからなる配列でな ければいけません。
...t_options(['-d', '--debug', GetoptLong::NO_ARGUMENT],
['--version', GetoptLong::NO_ARGUMENT],
['--help', GetoptLong::NO_ARGUMENT])
オプション名と引数のフラグの順番に決まりはないので、次のような
形式でも構......いません。
parser.set_options([GetoptLong::NO_ARGUMENT, '-d', '--debug'],
[GetoptLong::NO_ARGUMENT, '--version'],
[GetoptLong::NO_ARGUMENT, '--help'])... -
OptionParser
# to _ a -> [String] (13.0) -
サマリの各行を要素とした配列を返します。
...を返します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.to_a # => ["Usage: test [options]", " -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}...