143件ヒット
[1-100件を表示]
(0.226秒)
ライブラリ
-
net
/ imap (11) - optparse (88)
-
rdoc
/ rdoc (11) -
rubygems
/ command (11) -
rubygems
/ commands / build _ command (11) -
rubygems
/ commands / dependency _ command (11)
クラス
-
Gem
:: Command (11) -
Gem
:: Commands :: BuildCommand (11) -
Gem
:: Commands :: DependencyCommand (11) -
Net
:: IMAP :: MailboxQuota (11) - OptionParser (88)
-
RDoc
:: RDoc (11)
検索結果
先頭5件
-
Net
:: IMAP :: MailboxQuota # usage -> Integer (24402.0) -
現在のメールボックス内の使用量を返します。
現在のメールボックス内の使用量を返します。 -
Gem
:: Commands :: BuildCommand # usage -> String (21402.0) -
使用方法を表す文字列を返します。
使用方法を表す文字列を返します。 -
Gem
:: Command # usage -> String (18402.0) -
このメソッドはサブクラスで再定義されます。 個々の gem コマンドの使用方法を返します。
このメソッドはサブクラスで再定義されます。
個々の gem コマンドの使用方法を返します。 -
Gem
:: Commands :: DependencyCommand # usage -> String (18402.0) -
使用方法を表す文字列を返します。
使用方法を表す文字列を返します。 -
OptionParser
# on _ tail(*arg , &block) -> self (12337.0) -
オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。
...。
--version や --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", "--update")
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
en......d
opts.on_tail("--version", "Show version") do
puts OptionParser::Version.join('.')
exit
end
//}
@see OptionParser#on, OptionParser#on_head... -
OptionParser
# to _ a -> [String] (9337.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"]
//}... -
OptionParser
# to _ s -> String (9319.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-]verb... -
OptionParser
# separator(sep) -> () (9207.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...list[][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.library << lib
end
opts.separator ""
opts.separator "Common options:"
opts.on_tail......("-h", "--help", "Show this message") do
puts opts
exit
end
//}... -
OptionParser
# ver -> String (6331.0) -
program_name、version と release から生成したバージョンを表す文字列を返します。
...version と release から生成したバージョンを表す文字列を返します。
//emlist[例][ruby]{
require "optparse"
OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.program_name = "Optparse Example"
opts.version = [0, 1]
opts.release = "2019-05-01"......opts.on_tail("--version", "Show version") do
puts opts.ver # => "Optparse Example 0.1 (2019-05-01)"
exit
end
opts.parse!(ARGV)
end
//}... -
OptionParser
# help -> String (6319.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-]verb...