Sha256: cb268d2b7461ed030e4a101907b29885812d479bbbe4fdf69fe4d39b6624212c

Contents?: true

Size: 371 Bytes

Versions: 2

Compression:

Stored size: 371 Bytes

Contents

# frozen_string_literal: true

module Phlex
	module Rails
		module SGML
			module AppendMethodAddedWarning
				def method_added(name)
					if name == :append || name == :safe_append= || name == :safe_concat
						raise Phlex::NameError, "You shouldn't redefine the #{name} method as it's required for safe HTML output."
					end

					super
				end
			end
		end
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phlex-rails-0.7.1 lib/phlex/rails/sgml/append_method_added_warning.rb
phlex-rails-0.7.0 lib/phlex/rails/sgml/append_method_added_warning.rb