72件ヒット
[1-72件を表示]
(0.079秒)
検索結果
先頭5件
-
OptionParser
# on _ tail(*arg , &block) -> self (18126.0) -
オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。
...")
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("--versi... -
OptionParser
# parse!(argv = self . default _ argv) -> [String] (37.0) -
与えられた argv をパースします。
...ts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse!(ARGV) # => ["test"]
ARGV # => ["test"]
//}... -
OptionParser
# parse!(argv = self . default _ argv , into: nil) -> [String] (37.0) -
与えられた argv をパースします。
...ts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse!(ARGV) # => ["test"]
ARGV # => ["test"]
//}... -
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
# parse(*args) -> [String] (19.0) -
与えられた argv をパースします。 argv からオプションを取り除いたものを返します。
...ラスになります。
//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 # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
//}... -
OptionParser
# parse(*args , into: nil) -> [String] (19.0) -
与えられた argv をパースします。 argv からオプションを取り除いたものを返します。
...ラスになります。
//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 # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
//}... -
OptionParser
# parse(argv) -> [String] (19.0) -
与えられた argv をパースします。 argv からオプションを取り除いたものを返します。
...ラスになります。
//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 # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
//}... -
OptionParser
# parse(argv , into: nil) -> [String] (19.0) -
与えられた argv をパースします。 argv からオプションを取り除いたものを返します。
...ラスになります。
//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 # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
//}... -
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"]
//}...