lib/cms/object_extensions.rb
def safe_extend(target, *modules)
    modules.each do |m|
      if !target.extended_modules.include?(m)
        target.send :extend, m
      end
    end
  end
# Return any modules we +extend+
Return any modules we +extend+
Return any modules we + extend +
def safe_extend(target, *modules)
    modules.each do |m|
      if !target.extended_modules.include?(m)
        target.send :extend, m
      end
    end
  end
def safe_extend ( target , * modules ) modules . each do | m | if ! target . extended_modules . include? ( m ) target . send :extend , m end end end
Return any modules we +extend+
Return any modules we + extend +
target
modules