Sha256: 12612f4d83009b6744ba6ff1b78c70e50c652dc5b04e3c0f0e8c5107056d7e13

Contents?: true

Size: 317 Bytes

Versions: 16

Compression:

Stored size: 317 Bytes

Contents

# frozen_string_literal: true

# @api private
module Phlex::ElementClobberingGuard
	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
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
phlex-1.11.0 lib/phlex/element_clobbering_guard.rb
phlex-1.10.3 lib/phlex/element_clobbering_guard.rb
phlex-1.9.3 lib/phlex/element_clobbering_guard.rb
phlex-1.10.2 lib/phlex/element_clobbering_guard.rb
phlex-1.7.2 lib/phlex/element_clobbering_guard.rb
phlex-1.8.3 lib/phlex/element_clobbering_guard.rb
phlex-1.9.2 lib/phlex/element_clobbering_guard.rb
phlex-1.10.1 lib/phlex/element_clobbering_guard.rb
phlex-1.10.0 lib/phlex/element_clobbering_guard.rb
phlex-1.7.1 lib/phlex/element_clobbering_guard.rb
phlex-1.8.2 lib/phlex/element_clobbering_guard.rb
phlex-1.9.1 lib/phlex/element_clobbering_guard.rb
phlex-1.9.0 lib/phlex/element_clobbering_guard.rb
phlex-1.8.1 lib/phlex/element_clobbering_guard.rb
phlex-1.8.0 lib/phlex/element_clobbering_guard.rb
phlex-1.7.0 lib/phlex/element_clobbering_guard.rb