Class: BetterHtml::TestHelper::SafeErb::Base
- Inherits:
- 
      Object
      
        - Object
- BetterHtml::TestHelper::SafeErb::Base
 
- Defined in:
- lib/better_html/test_helper/safe_erb/base.rb
Direct Known Subclasses
AllowedScriptType, NoJavascriptTagHelper, NoStatements, ScriptInterpolation, TagInterpolation
Instance Attribute Summary collapse
- 
  
    
      #errors  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute errors. 
Instance Method Summary collapse
- #add_error(message, location:) ⇒ Object
- 
  
    
      #initialize(parser, config: BetterHtml.config)  ⇒ Base 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Base. 
Constructor Details
#initialize(parser, config: BetterHtml.config) ⇒ Base
Returns a new instance of Base.
| 14 15 16 17 18 | # File 'lib/better_html/test_helper/safe_erb/base.rb', line 14 def initialize(parser, config: BetterHtml.config) @parser = parser @config = config @errors = BetterHtml::Errors.new end | 
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
| 12 13 14 | # File 'lib/better_html/test_helper/safe_erb/base.rb', line 12 def errors @errors end | 
Instance Method Details
#add_error(message, location:) ⇒ Object
| 20 21 22 | # File 'lib/better_html/test_helper/safe_erb/base.rb', line 20 def add_error(, location:) @errors.add(SafetyError.new(, location: location)) end |