10件ヒット
[1-10件を表示]
(0.047秒)
別のキーワード
クラス
- OptionParser (10)
キーワード
-
on
_ head (1) -
on
_ tail (1) - parse (2)
- parse! (1)
- separator (1)
- summarize (2)
-
summary
_ indent= (1) -
summary
_ width= (1)
検索結果
先頭5件
- 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
# on _ tail(*arg , &block) -> self - OptionParser
# on _ head(*arg , &block) -> self - OptionParser
# parse(*args) -> [String]
-
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (208.0) -
サマリを指定された to へと加えていきます。
...大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//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.summarize
#... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (208.0) -
サマリを指定された to へと加えていきます。
...大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//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.summarize
#... -
OptionParser
# on _ tail(*arg , &block) -> self (190.0) -
オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。
...]{
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
//}
//emlist[例][ruby]{
require "optparse"
opts = Op... -
OptionParser
# on _ head(*arg , &block) -> self (154.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... -
OptionParser
# parse(*args) -> [String] (118.0) -
与えられた argv をパースします。 argv からオプションを取り除いたものを返します。
...実際は OptionParser::ParseError のサブク
ラスになります。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
ARGV... -
OptionParser
# parse(argv) -> [String] (118.0) -
与えられた argv をパースします。 argv からオプションを取り除いたものを返します。
...実際は OptionParser::ParseError のサブク
ラスになります。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
ARGV... -
OptionParser
# summary _ indent=(indent) (100.0) -
サマリを表示する時のインデントを文字列で指定します。
...す。
@param indent サマリを表示する時に使われるインデントを文字列で指定します。
//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.summary_ind... -
OptionParser
# summary _ width=(width) (100.0) -
サマリを表示するときの幅を整数で指定します。
...幅を整数で指定します。
@param width サマリを表示するときの幅を整数で指定します。
//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.summary_w... -
OptionParser
# parse!(argv = self . default _ argv) -> [String] (82.0) -
与えられた argv をパースします。
...実際は OptionParser::ParseError のサブク
ラスになります。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
ARGV... -
OptionParser
# separator(sep) -> () (64.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...ところでこのメソッドを呼びます。
@param sep サマリの区切りを文字列で指定します。
//emlist[][ruby]{
require 'optparse'
opts = OptionParser.new
opts.banner = "Usage: example.rb [options]"
opts.separator ""
opts.separator "Specific options:"
opts.on("-r", "--requi...