Class: BetterHtml::TestHelper::SafeErb::ScriptInterpolation
- Defined in:
- lib/better_html/test_helper/safe_erb/script_interpolation.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from BetterHtml::TestHelper::SafeErb::Base
Instance Method Details
#validate ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/better_html/test_helper/safe_erb/script_interpolation.rb', line 10 def validate .each do |tag, content_node| if content_node.present? && (tag.attributes["type"]&.value || "text/javascript") == "text/javascript" validate_script(content_node) end end if @parser.template_language == :javascript @parser.nodes_with_type(:text).each do |node| validate_script(node) end end end |