2件ヒット
[1-2件を表示]
(0.413秒)
トップページ > クラス:Module
>
:インスタンスメソッド
>
:_builtin
>
:new
>
:define_method
>
:ビルトイン
>
:module_exec
>
:2.1.0
![条件を削除 [x]](/images/drop-condition-icon.png)
![種類 種類](/images/type-icon.png)
![条件を削除 [x]](/images/drop-condition-icon.png)
![クエリ クエリ](/images/query-icon.png)
![条件を削除 [x]](/images/drop-condition-icon.png)
![クエリ クエリ](/images/query-icon.png)
![条件を削除 [x]](/images/drop-condition-icon.png)
![クエリ クエリ](/images/query-icon.png)
![条件を削除 [x]](/images/drop-condition-icon.png)
![ライブラリ ライブラリ](/images/library-icon.png)
![条件を削除 [x]](/images/drop-condition-icon.png)
![クエリ クエリ](/images/query-icon.png)
![条件を削除 [x]](/images/drop-condition-icon.png)
![バージョン バージョン](/images/version-icon.png)
![条件を削除 [x]](/images/drop-condition-icon.png)
検索結果
先頭2件
-
Module
# module _ exec(*args) {|*vars| . . . } -> object (69352.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...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... -
Module
# class _ exec(*args) {|*vars| . . . } -> object (24052.0) -
与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。
...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...