method

prepended

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: Module
prepended(p1) private

The equivalent of included, but for prepended modules.

module A
  def self.prepended(mod)
    puts "#{self} prepended to #{mod}"
  end
end
module Enumerable
  prepend A
end
 # => prints "A prepended to Enumerable"
Show source
Register or log in to add new notes.