Class: ThemeCheck::Visitor
- Inherits:
-
Object
- Object
- ThemeCheck::Visitor
- Defined in:
- lib/theme_check/visitor.rb
Instance Method Summary collapse
-
#initialize(checks) ⇒ Visitor
constructor
A new instance of Visitor.
- #visit_template(template) ⇒ Object
Constructor Details
#initialize(checks) ⇒ Visitor
Returns a new instance of Visitor.
4 5 6 |
# File 'lib/theme_check/visitor.rb', line 4 def initialize(checks) @checks = checks end |
Instance Method Details
#visit_template(template) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/theme_check/visitor.rb', line 8 def visit_template(template) @disabled_checks = DisabledChecks.new visit(Node.new(template.root, nil, template)) rescue Liquid::Error => exception exception.template_name = template.name call_checks(:on_error, exception) end |