Skip to content
instance method

Module#prepended

(::Module othermod) -> untyped
prepended(othermod)

The equivalent of included, but for prepended modules.

Example
module A
  def self.prepended(mod)
    puts "#{self} prepended to #{mod}"
  end
end
module Enumerable
  prepend A
end
 # => prints "A prepended to Enumerable"
See also #prepend #prepend_features #name #private also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0