Project

General

Profile

Feature #8026

Need Module#prepended_modules

Added by marcandre (Marc-Andre Lafortune) over 7 years ago. Updated 7 months ago.

Status:
Feedback
Priority:
Normal
Target version:
-
[ruby-core:53159]

Description

We should have a way to get the list of prepended modules of a class or module.

module Mixin
end

module Outer
  prepend Mixin
end

Mixin.prepended_modules   #=> []
Outer.prepended_modules   #=> [Mixin]

See also bug #8025.


Files

prepended.pdf (99.4 KB) prepended.pdf marcandre (Marc-Andre Lafortune), 08/31/2013 08:29 AM

Related issues

Related to Ruby master - Bug #8841: Module#included_modules and prepended modulesClosedmatz (Yukihiro Matsumoto)Actions
Has duplicate Ruby master - Feature #11879: `Module#prepended_modules`ClosedActions

Also available in: Atom PDF