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
19 20 21 |
# File 'lib/better_html/config.rb', line 19 def javascript_attribute_name?(name) javascript_attribute_names.any? { |other| other === name.to_s } # rubocop:disable Style/CaseEquality end |
#javascript_safe_method?(name) ⇒ Boolean
27 28 29 |
# File 'lib/better_html/config.rb', line 27 def javascript_safe_method?(name) javascript_safe_methods.include?(name.to_s) end |
#lodash_safe_javascript_expression?(code) ⇒ Boolean
23 24 25 |
# File 'lib/better_html/config.rb', line 23 def lodash_safe_javascript_expression?(code) lodash_safe_javascript_expression.any? { |other| other === code } # rubocop:disable Style/CaseEquality end |