Class: BetterHtml::Config
- Inherits:
-
Object
- Object
- BetterHtml::Config
- Includes:
- SmartProperties
- Defined in:
- lib/better_html/config.rb
Instance Method Summary collapse
- #javascript_attribute_name?(name) ⇒ Boolean
- #javascript_safe_method?(name) ⇒ Boolean
- #lodash_safe_javascript_expression?(code) ⇒ Boolean
Instance Method Details
#javascript_attribute_name?(name) ⇒ Boolean
20 21 22 |
# File 'lib/better_html/config.rb', line 20 def javascript_attribute_name?(name) javascript_attribute_names.any? { |other| other === name.to_s } # rubocop:disable Style/CaseEquality end |
#javascript_safe_method?(name) ⇒ Boolean
28 29 30 |
# File 'lib/better_html/config.rb', line 28 def javascript_safe_method?(name) javascript_safe_methods.include?(name.to_s) end |
#lodash_safe_javascript_expression?(code) ⇒ Boolean
24 25 26 |
# File 'lib/better_html/config.rb', line 24 def lodash_safe_javascript_expression?(code) lodash_safe_javascript_expression.any? { |other| other === code } # rubocop:disable Style/CaseEquality end |