module Pluginscan # Responsible for deciding whether usages of a variable in a string are in a comment module CommentChecker COMMENT_REGEXPS = [ %r{^\s*//}, # line comment /^\s*\*/, # block comment ].freeze def self.commented?(content) COMMENT_REGEXPS.any? { |regexp| content.match(regexp) } end end end