るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.052秒)
トップページ > クエリ:d[x] > クエリ:module_exec[x]

別のキーワード

  1. module attr
  2. module public
  3. module private
  4. module protected
  5. module new

ライブラリ

クラス

キーワード

検索結果

Module#module_exec(*args) {|*vars| ... } -> object (21201.0)

与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。

...end
c = 1

Thing.class_exec{
d
ef hello()
"Hello there!"
end

d
efine_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}

t = Thing.new
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}

@see Module#module_eval, Modul...

Module#class_exec(*args) {|*vars| ... } -> object (3001.0)

与えられたブロックを指定された args を引数としてモジュールのコンテキストで評価します。

...end
c = 1

Thing.class_exec{
d
ef hello()
"Hello there!"
end

d
efine_method(:foo) do # ローカル変数がブロックの外側を参照している
c
end
}

t = Thing.new
p t.hello() #=> "Hello there!"
p t.foo() #=> 1
//}

@see Module#module_eval, Modul...

ruby 1.9 feature (18.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...ew]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど(互換性のある変更) (only backward-compatibility) (影響の範囲が小さいと思われる変更もこちら)
* [change]: 変更されたクラス/メソッドなど(互換性...
...spect

=== 2006-09-14

: digest.rb
: Digest::Base.file

=== 2006-09-13

: Hash#compare_by_identity
: Hash#compare_by_identity?
: Hash#identical
: Hash#identical?

=== 2006-09-12

: Hash#compare_by_identity
: Hash#compare_by_identity?

=== 2006-09-11

: Hash#identical
: Hash#identical?

=== 2006-08-3...
...call から改名

: Module#instance_exec [new]
: Module#module_exec [new]

追加

=== 2005-09-16
: ((<Dir/Dir.glob>)) [compat]
: ((<Dir/Dir.[]>)) [compat]

D
ir.glob に配列を渡して複数のパターンを指定できるようになりました。
また、Dir[] は、複数の引...