5件ヒット
[1-5件を表示]
(0.100秒)
種類
- インスタンスメソッド (3)
- モジュール関数 (2)
ライブラリ
- ビルトイン (5)
クラス
- Object (1)
- UncaughtThrowError (2)
モジュール
- Kernel (2)
キーワード
- catch (2)
-
respond
_ to? (1) -
to
_ s (1)
検索結果
先頭5件
-
UncaughtThrowError
# tag -> object (78388.0) -
Kernel.#throw に指定した tag を返します。
Kernel.#throw に指定した tag を返します。
//emlist[例:][ruby]{
def do_complicated_things
throw :uncaught_label
end
begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.tag # => ":uncaught_label"
end
//} -
Object
# respond _ to?(name , include _ all = false) -> bool (42337.0) -
オブジェクトがメソッド name を持つとき真を返します。
オブジェクトがメソッド name を持つとき真を返します。
オブジェクトが メソッド name を持つというのは、
オブジェクトが メソッド name に応答できることをいいます。
Windows での Process.fork や GNU/Linux での File.lchmod の
ような NotImplementedError が発生する場合は false を返します。
※ NotImplementedError が発生する場合に false を返すのは
Rubyの組み込みライブラリや標準ライブラリなど、C言語で実装されているメソッドのみです。
Rubyで実装されたメソッドで N... -
Kernel
. # catch(tag) {|tag| . . . . } -> object (24718.0) -
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
ブロックの実行中に tag と同一のオブジェクトを引数とする Kernel.#throw が行われた
場合は、その throw の第二引数を戻り値として、ブロックの実行を終了します。
主にネストしたループから一気に脱出するのに使用します。
引数を省略した場合、タグとなるオブジェクトが内部で生成され、ブロックパラメータ tag に
渡されます。
@param tag タグとなる任意のオブジェクトです。
@return ブロックの返り値か、対応するthrowの第二引数を返り値として返しま... -
Kernel
. # catch {|tag| . . . . } -> object (24418.0) -
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
Kernel.#throwとの組み合わせで大域脱出を行います。 catch はブロックを実行します。
ブロックの実行中に tag と同一のオブジェクトを引数とする Kernel.#throw が行われた
場合は、その throw の第二引数を戻り値として、ブロックの実行を終了します。
主にネストしたループから一気に脱出するのに使用します。
引数を省略した場合、タグとなるオブジェクトが内部で生成され、ブロックパラメータ tag に
渡されます。
@param tag タグとなる任意のオブジェクトです。
@return ブロックの返り値か、対応するthrowの第二引数を返り値として返しま... -
UncaughtThrowError
# to _ s -> String (24067.0) -
self を tag を含む文字列表現にして返します。
self を tag を含む文字列表現にして返します。
//emlist[例][ruby]{
def do_complicated_things
throw :uncaught_label
end
begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.to_s # => "uncaught throw :uncaught_label"
end
//}