module Pluginscan # Extends Check with helpers for making patterns and ignores based on a list of variables or constantst class VariableCheck < Check def initialize(check_hash) super(check_hash) @patterns = Array(check_hash[:variables]).map{ |var| Regexp.new(Regexp.escape(var)) } end def ignore?(variable, content) VariableSafetyChecker.new.all_safe?(variable, content) || CommentChecker.commented?(content) end end end