Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Module#append_features

(::Module mod) -> self
append_features(mod) → mod

When this module is included in another, Ruby calls append_features in this module, passing it the receiving module in mod. Ruby’s default implementation is to add the constants, methods, and module variables of this module to mod if this module has not already been added to mod or one of its ancestors. See also Module#include.

See also #ancestors #attr #alias_method #attr_accessor also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0