Class: BetterHtml::TestHelper::SafeErb::AllowedScriptType

Inherits:
Base
  • Object
show all
Defined in:
lib/better_html/test_helper/safe_erb/allowed_script_type.rb

Constant Summary collapse

VALID_JAVASCRIPT_TAG_TYPES =
["application/ld+json", "text/javascript", "text/template", "text/html", "module"]

Instance Attribute Summary

Attributes inherited from Base

#errors

Instance Method Summary collapse

Methods inherited from Base

#add_error, #initialize

Constructor Details

This class inherits a constructor from BetterHtml::TestHelper::SafeErb::Base

Instance Method Details

#validateObject



11
12
13
14
15
# File 'lib/better_html/test_helper/safe_erb/allowed_script_type.rb', line 11

def validate
  script_tags.each do |tag, _|
    validate_type(tag)
  end
end