3件ヒット
[1-3件を表示]
(0.114秒)
別のキーワード
種類
- インスタンスメソッド (2)
- 関数 (1)
ライブラリ
- ビルトイン (2)
クラス
- Module (2)
キーワード
- ancestors (1)
-
rb
_ mod _ included _ modules (1)
検索結果
先頭3件
-
Module
# included _ modules -> [Module] (72640.0) -
self にインクルードされているモジュールの配列を返します。
self にインクルードされているモジュールの配列を返します。
//emlist[例][ruby]{
module Mixin
end
module Outer
include Mixin
end
Mixin.included_modules #=> []
Outer.included_modules #=> [Mixin]
//}
@see Module#ancestors -
VALUE rb
_ mod _ included _ modules(VALUE mod) (36601.0) -
モジュール mod にインクルードされているモジュールの配列を返します。
モジュール mod にインクルードされているモジュールの配列を返します。 -
Module
# ancestors -> [Class , Module] (18337.0) -
クラス、モジュールのスーパークラスとインクルードしているモジュール を優先順位順に配列に格納して返します。
クラス、モジュールのスーパークラスとインクルードしているモジュール
を優先順位順に配列に格納して返します。
//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
p ancestors
p included_modules
p superclass
end
# => [Baz, Bar, Foo, Object, Kernel, BasicObject]
# => [Foo, Kernel]
# => Bar
//}
@see Module#included_modules
...