Sha256: f6c89c7021931638a45031a148a35c61a016f8a270acbea23bed1622bf59d4d8

Contents?: true

Size: 314 Bytes

Versions: 3

Compression:

Stored size: 314 Bytes

Contents

# frozen_string_literal: true

module Phlex
	module ElementClobberingGuard
		def method_added(method_name)
			if method_name[0] == "_" && element_method?(method_name[1..].to_sym)
				raise NameError, "👋 Redefining the method `#{name}##{method_name}` is not a good idea."
			else
				super
			end
		end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
phlex-1.6.3 lib/phlex/element_clobbering_guard.rb
phlex-1.6.2 lib/phlex/element_clobbering_guard.rb
phlex-1.6.1 lib/phlex/element_clobbering_guard.rb