class FoodCritic::ErrorChecker
Expose if any errors are found in parsing
def self.register_error_handlers
def self.register_error_handlers error_methods = SexpBuilder.public_instance_methods.grep(/^on_.*_error$/) error_methods.sort.each do |err_meth| define_method(err_meth) { |*| @found_error = true } end end
def error?
def error? @found_error end
def initialize(*args)
- See: Ripper::SexpBuilder#initialize -
def initialize(*args) super(*args) @found_error = false end