Class: PlatformosCheck::HtmlVisitor

Inherits:
Object
  • Object
show all
Defined in:
lib/platformos_check/html_visitor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(checks) ⇒ HtmlVisitor

Returns a new instance of HtmlVisitor.



10
11
12
# File 'lib/platformos_check/html_visitor.rb', line 10

def initialize(checks)
  @checks = checks
end

Instance Attribute Details

#checksObject (readonly)

Returns the value of attribute checks.



8
9
10
# File 'lib/platformos_check/html_visitor.rb', line 8

def checks
  @checks
end

Instance Method Details

#visit_liquid_file(liquid_file) ⇒ Object



14
15
16
17
18
# File 'lib/platformos_check/html_visitor.rb', line 14

def visit_liquid_file(liquid_file)
  visit(HtmlNode.parse(liquid_file))
rescue ArgumentError => e
  call_checks(:on_parse_error, e, liquid_file)
end