るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.038秒)
トップページ > クエリ:Ruby[x] > クラス:Module[x] > 種類:インスタンスメソッド[x] > クエリ:include[x] > クエリ:>[x] > クエリ:included_modules[x]

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. module >
  4. comparable >
  5. integer >

ライブラリ

検索結果

Module#included_modules -> [Module] (24327.0)

self にインクルードされているモジュールの配列を返します。

...self にインクルードされているモジュールの配列を返します。

//emlist[例][ruby]{
module
Mixin
end

module
Outer
include
Mixin
end

Mixin.included_modules #=> []
Outer.included_modules #=> [Mixin]
//}

@see Module#ancestors...

Module#ancestors -> [Class, Module] (126.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...