503件ヒット
[501-503件を表示]
(0.101秒)
別のキーワード
ライブラリ
- ビルトイン (503)
キーワード
- < (12)
- <= (12)
- <=> (12)
- === (12)
- > (12)
- >= (12)
-
alias
_ method (8) -
append
_ features (12) - autoload (12)
-
class
_ eval (24) -
class
_ exec (12) -
const
_ added (3) -
deprecate
_ constant (12) -
extend
_ object (12) - extended (12)
- freeze (12)
- include (12)
- include? (12)
- included (12)
-
included
_ modules (12) -
instance
_ method (12) -
module
_ eval (24) -
module
_ exec (12) - prepend (12)
-
prepend
_ features (12) - prepended (12)
-
private
_ class _ method (24) -
private
_ constant (12) - public (48)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) -
remove
_ method (12) -
singleton
_ class? (12) -
undef
_ method (12) - using (12)
検索結果
-
Module
# module _ exec(*args) {|*vars| . . . } -> object (8.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...ュールのコンテキストで評価します。
モジュールのコンテキストで評価するとは、実行中そのモジュールが self になるということです。
つまり、そのモジュールの定義式の中にあるかのように実行されます。
ローカル変......ing.class_exec{
def hello()
"Hello there!"
end
define_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}
t = Thing.new
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}
@see Module#module_eval, Module#class_eval...