るりまサーチ

最速Rubyリファレンスマニュアル検索!
254件ヒット [1-100件を表示] (0.130秒)
トップページ > クエリ:I[x] > クエリ:Require[x] > クエリ:help[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. kernel $-i
  5. _builtin i

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

IRB::ExtendCommandBundle.install_extend_commands -> object (26118.0)

定義済みの拡張を読み込みます。

...

i
rb で以下のメソッドが利用できるようになります。(それぞれ 1 つだけ抜粋)

* irb_current_working_workspace
* irb_change_workspace
* irb_workspaces
* irb_push_workspace
* irb_pop_workspace
* irb_load
* irb_require
* irb_source
* irb
* irb_jobs
* irb_fg
* irb...
..._kill
* irb_help

i
rb/extend-command が require された時にライブラリ内部で自動的
に実行されます。

@see IRB::ExtendCommandBundle.install_extend_commands...

OptionParser#help -> String (21213.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, -...

OptionParser#summary_indent -> String (6242.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.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_indent=(indent) (6242.0)

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

...@param indent サマリを表示する時に使われるインデントを文字列で指定します。

//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.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=(width) (6242.0)

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

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

//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.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\n"]
//}...

絞り込み条件を変える

OptionParser#on_tail(*arg, &block) -> self (6154.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")
op...
...ts.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("--version", "S...
...how version") do
puts OptionParser::Version.join('.')
exit
end
//}

@see OptionParser#on, OptionParser#on_head...

irb (6144.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...irb は Interactive Ruby の略です。
i
rb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

=== irb の使い方

Ruby さえ知っていれば irb を使うのは簡単です。
i
rb コマンドを実行すると、以下のようなプロン...
...ブジェクトをサブ irb と共
有する
--irb_debug n irb のデバッグレベルを n に設定する
(ユーザは利用すべきではない)
-v, --version irb のバージョンを表示する
-h, --help irb のヘルプを表...
...

Kernel.#load と異なり、path の内容を irb で一行ずつタイプしたか
のように、irb 上で一行ずつ評価されます。

: irb_require(path)

Ruby の require irb 版です。
ファイル path を現在の irb インタプリタ上で実行します。

pat...

OptionParser#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) -> () (6142.0)

サマリを指定された to へと加えていきます。

...m width サマリの幅を整数で指定します。

@param max サマリの最大幅を整数で指定します。

@param indent サマリのインデントを文字列で指定します。

//emlist[例][ruby]{
require
"optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")...
...n("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}...

OptionParser#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) {|line| ... } -> () (6142.0)

サマリを指定された to へと加えていきます。

...m width サマリの幅を整数で指定します。

@param max サマリの最大幅を整数で指定します。

@param indent サマリのインデントを文字列で指定します。

//emlist[例][ruby]{
require
"optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")...
...n("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}...

OptionParser#summary_width -> Integer (6142.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.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"]
//}...

絞り込み条件を変える

<< 1 2 3 > >>