class RailsErbCheck::Checker
Constants
- CHECKER
Attributes
error[R]
Public Class Methods
new(erb_path)
click to toggle source
# File lib/rails-erb-lint/helpers/rails_erb_check.rb, line 14 def initialize(erb_path) @erb = File.read(erb_path) end
Public Instance Methods
valid_syntax?()
click to toggle source
# File lib/rails-erb-lint/helpers/rails_erb_check.rb, line 18 def valid_syntax? begin CHECKER.call(@erb) rescue SyntaxError => e @error = e return false rescue Exception return true end end