Class: Module
Instance Method Summary collapse
Instance Method Details
#mark_helpers_as_xss_protected(*ms) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/xss_shield/secure_helpers.rb', line 2 def mark_helpers_as_xss_protected(*ms) ms.each do |m| begin instance_method("#{m}_with_xss_protection") rescue NameError define_method :"#{m}_with_xss_protection" do |*args| send(:"#{m}_without_xss_protection", *args).mark_as_xss_protected end alias_method_chain m, :xss_protection end end end |