Module: RailsDrivers::Extensions::CheckForShadowedMethods
- Defined in:
- lib/rails_drivers/extensions.rb
Overview
This module is prepended to the singleton class of the including class to detect when an extension is attempting to re-define any methods.
Instance Method Summary collapse
Instance Method Details
#method_added(method_name) ⇒ Object
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/rails_drivers/extensions.rb', line 34 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 |