module RailsDrivers::Extensions::CheckForShadowedMethods

This module is prepended to the singleton class of the including class to detect when an extension is attempting to re-define any methods.

Public Instance Methods

method_added(method_name) click to toggle source
Calls superclass method
# File lib/rails_drivers/extensions.rb, line 35
def method_added(method_name)
  driver_extensions.each do |extension|
    next unless extension.instance_methods.include?(method_name)

    Rails.logger.warn "Driver extension method #{extension.name}##{method_name} "\
      "is shadowed by #{name}##{method_name} and will likely not do anything."
  end

  super(method_name)
end