るりまサーチ (Ruby 2.2.0)

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

別のキーワード

  1. bigdecimal/util to_d
  2. float to_d
  3. string to_d
  4. integer to_d
  5. rational to_d

ライブラリ

クラス

検索結果

Module#included_modules -> [Module] (108943.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] (18640.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
...