るりまサーチ

最速Rubyリファレンスマニュアル検索!
192件ヒット [101-192件を表示] (0.102秒)

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. range end

ライブラリ

クラス

キーワード

検索結果

<< < 1 2 >>

OptionParser#summary_indent=(indent) (25.0)

サマリを表示する時のインデントを文字列で指定します。

..."-h", "--help")
end


opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_indent = " " # => " "
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}...

OptionParser#summary_width -> Integer (25.0)

サマリを表示するときの幅を整数で返します。

..."--help")
end


opts.summary_width # => 32
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_width = 8
opts.summary_width # =>8
opts.summarize
# => [" -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]...

OptionParser#summary_width=(width) (25.0)

サマリを表示するときの幅を整数で指定します。

...help")
end


opts.summary_width # => 32
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_width = 8 # => 8
opts.summary_width # => 8
opts.summarize
# => [" -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help...

OptionParser#separator(sep) -> () (19.0)

サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。

...= "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#to_a -> [String] (19.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#parse!(argv = self.default_argv) -> [String] (13.0)

与えられた argv をパースします。

...[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"]
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse!...

OptionParser#parse!(argv = self.default_argv, into: nil) -> [String] (13.0)

与えられた argv をパースします。

...[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"]
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse!...

OptionParser#parse(*args) -> [String] (13.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] (13.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] (13.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] (13.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"]
//}...
<< < 1 2 >>