Module: Phlex::ElementClobberingGuard Private
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
Instance Method Details
#method_added(method_name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 8 9 10 11 |
# File 'lib/phlex/element_clobbering_guard.rb', line 5 def method_added(method_name) if method_name[0] == "_" && element_method?(method_name[1..].to_sym) raise Phlex::NameError, "👋 Redefining the method `#{name}##{method_name}` is not a good idea." else super end end |