33件ヒット
[1-33件を表示]
(0.049秒)
検索結果
-
OptionParser
# help -> String (18119.0) -
サマリの文字列を返します。
...例][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-]verbose... -
OptionParser
# to _ s -> String (3019.0) -
サマリの文字列を返します。
...例][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-]verbose... -
OptionParser
# separator(sep) -> () (18.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...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 messa...