48件ヒット
[1-48件を表示]
(0.007秒)
ライブラリ
- ビルトイン (48)
キーワード
-
_ _ callee _ _ (12) -
_ _ method _ _ (12) -
global
_ variables (12) -
local
_ variables (12)
検索結果
先頭4件
-
Kernel
. # _ _ callee _ _ -> Symbol | nil (101.0) -
現在のメソッド名を返します。 メソッドの外で呼ばれると nil を返します。
...//emlist[例][ruby]{
def foo
p __callee__
end
alias :bar :foo
foo # => :foo
bar # => :bar
p __callee__ # => nil
//}
Kernel.#__method__ とは異なり、現在のメソッド名が alias されたメ
ソッドの場合には alias 先のメソッド名を返します。
@see Kernel.#__method__... -
Kernel
. # _ _ method _ _ -> Symbol | nil (101.0) -
現在のメソッド名を返します。 メソッドの外で呼ばれると nil を返します。
現在のメソッド名を返します。
メソッドの外で呼ばれると nil を返します。
//emlist[例][ruby]{
def foo
p __method__
end
alias :bar :foo
foo #=> :foo
bar #=> :foo
p __method__ #=> nil
//}
現在のメソッド名が alias されたメソッドの場合でも alias 元のメソッド名
を返します。 -
Kernel
. # global _ variables -> [Symbol] (101.0) -
プログラム中で定義されているグローバル変数(`$'で始まる変数)名の 配列を返します。
...グラム中で定義されているグローバル変数(`$'で始まる変数)名の
配列を返します。
//emlist[例][ruby]{
p global_variables #=> [:$;, :$-F, :$@, ... ]
//}
@see Kernel.#local_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables... -
Kernel
. # local _ variables -> [Symbol] (101.0) -
現在のスコープで定義されているローカル変数名の配列を返します。
...現在のスコープで定義されているローカル変数名の配列を返します。
//emlist[例][ruby]{
yuyu = 0
p local_variables #=> [:yuyu]
//}
@see Kernel.#global_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables...