method

prepended

Importance_1
v2_4_6 - Show latest stable - 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.