るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.043秒)
トップページ > ライブラリ:ビルトイン[x] > バージョン:2.5.0[x] > クエリ:each[x] > クエリ:append_features[x]

別のキーワード

  1. rake append
  2. mutex_m append_features
  3. fcntl o_append
  4. invocationchain append
  5. readline completion_append_character

クラス

検索結果

Module#append_features(module_or_class) -> self (54382.0)

モジュール(あるいはクラス)に self の機能を追加します。

モジュール(あるいはクラス)に self の機能を追加します。

このメソッドは Module#include の実体であり、
include を Ruby で書くと以下のように定義できます。

//emlist[例][ruby]{
def include(*modules)
modules.reverse_each do |mod|
# append_features や included はプライベートメソッドなので
# 直接 mod.append_features(self) などとは書けない
mod.__send__(:append_features, s...