るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.173秒)
トップページ > クエリ:t[x] > クエリ:Ruby[x] > 種類:インスタンスメソッド[x] > クエリ:r[x] > クエリ:run[x] > クラス:OptionParser[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

OptionParser#to_s -> String (9220.0)

サマリの文字列を返します。

...emlist[例][ruby]{
r
equire "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...
...Run verbosely
//}...

OptionParser#banner -> String (9214.0)

サマリの最初に表示される文字列を返します。

...す。

@return サマリの最初に表示される文字列を返します。

//emlist[例][ruby]{
r
equire "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

p opts.banner # => "Usage: example.rb [options]"
//}...

OptionParser#banner=(heading) (9114.0)

サマリの最初に表示される文字列を指定します。

...@param heading サマリの最初に表示される文字列を指定します。

//emlist[例][ruby]{
r
equire "optparse"

options = {}
opts = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]" # => "Usage: example.rb [options]"

opts.on("-v", "--[no-]verbose", "Run verbose...
...ly") do |v|
options[:verbose] = v
end
end

opts.banner # => "Usage: example.rb [options]"
//}...

OptionParser#help -> String (6220.0)

サマリの文字列を返します。

...emlist[例][ruby]{
r
equire "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...
...Run verbosely
//}...