るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.057秒)

別のキーワード

  1. fiddle build_ruby_platform
  2. fiddle ruby_free
  3. rbconfig ruby
  4. rubygems/defaults ruby_engine
  5. rake ruby

ライブラリ

キーワード

検索結果

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

Module#included_modules -> [Module] (12239.0)

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

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

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

module
Outer
include
Mixin
end

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

@see Module#ancestors...

Module#>(other) -> bool | nil (62.0)

比較演算子。 self が other の先祖である場合、true を返します。 self が other の子孫か同一クラスである場合、false を返します。

...発生します。

@see Module#<

//emlist[例][ruby]{
module
Awesome; end
module
Included
include
Awesome
end
module
Prepended
prepend Awesome
end

Included
.ancestors # => [Included, Awesome]
Awesome > Included # => true
Included
> Awesome # => false

Prepended.ancestors # => [Awesome, Prepend...