114件ヒット
[1-100件を表示]
(0.031秒)
別のキーワード
ライブラリ
- ビルトイン (30)
-
irb
/ cmd / help (12) -
irb
/ context (12) -
irb
/ extend-command (12) - optparse (24)
- rake (12)
- win32ole (12)
クラス
- Fiber (18)
-
IRB
:: Context (12) -
IRB
:: ExtendCommand :: Help (12) - OptionParser (24)
-
Process
:: Status (12) - WIN32OLE (12)
モジュール
- FileUtils (12)
-
IRB
:: ExtendCommandBundle (12)
検索結果
先頭5件
-
IRB
:: Context # exit(ret = 0) -> object (18114.0) -
irb を終了します。ret で指定したオブジェクトを返します。
...irb を終了します。ret で指定したオブジェクトを返します。
@param ret 戻り値を指定します。
@see IRB.irb_exit... -
IRB
:: ExtendCommandBundle # irb _ exit(ret = 0) -> object (6108.0) -
irb を終了します。ret で指定したオブジェクトを返します。
...irb を終了します。ret で指定したオブジェクトを返します。
@param ret 戻り値を指定します。
ユーザが直接使用するものではありません。... -
Fiber
# raise -> object (31.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...3つ目の引数に
例外発生時のスタックトレースを指定できます。
@param message 例外のメッセージとなる文字列です。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定......{ Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
Fiber
# raise(exception , message = nil , backtrace = nil) -> object (31.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...3つ目の引数に
例外発生時のスタックトレースを指定できます。
@param message 例外のメッセージとなる文字列です。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定......{ Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
Fiber
# raise(message) -> object (31.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...3つ目の引数に
例外発生時のスタックトレースを指定できます。
@param message 例外のメッセージとなる文字列です。
@param exception 発生させる例外です。
@param backtrace 例外発生時のスタックトレースです。文字列の配列で指定......{ Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
OptionParser
# on _ tail(*arg , &block) -> self (25.0) -
オプションを取り扱うためのブロックを自身の持つリストの最後に登録します。
...最後に登録します。
--version や --help の説明をサマリの最後に表示したい時に便利です。
@param arg OptionParser#on と同様です。
@param block OptionParser#on と同様です。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.o......, --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", "Show version") do
puts OptionParser::Version.join('.')
exit
end
//}
@see OptionParser#on, OptionParser#on_head... -
FileUtils
# sh(*cmd) {|result , status| . . . } (13.0) -
与えられたコマンドを実行します。
...@param cmd 引数の解釈に関しては Kernel.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #{res.exitsta... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (13.0) -
RI から Ruby のドキュメントを参照します。
...RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソ......できま
す。
irb(main):001:0> help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.matc... -
OptionParser
# separator(sep) -> () (13.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...ソッドを呼んだ順にオプションが表示されるので、区切りを挿入したい
ところでこのメソッドを呼びます。
@param sep サマリの区切りを文字列で指定します。
//emlist[][ruby]{
require 'optparse'
opts = OptionParser.new
opts.banner = "Usage: exa......mple.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
//}... -
Process
:: Status # >>(num) -> Integer (13.0) -
self.to_i >> num と同じです。
...self.to_i >> num と同じです。
@param num 整数を指定します。
fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99...