lib/rordan_gramsay/lint/cookbook_comments_checker.rb
def author?
          @author ||= @lines.any? do |line|
            break true if line =~ /maintainer/i # "Maintainer(s): "
            break true if line =~ /author/i # "Author(s): "
            break true if line =~ /\w@\w/i # email address
            break true if line =~ /(?:^| )by:? /i # "By John Doe"

            false
          end
        end
# Detects if authorship line is included
Detects if authorship line is included
Detects if authorship line is included
def author?
          @author ||= @lines.any? do |line|
            break true if line =~ /maintainer/i 
            break true if line =~ /author/i 
            break true if line =~ /\w@\w/i 
            break true if line =~ /(?:^| )by:? /i 
            false
          end
        end
def author? @author ||= @lines . any? do | line | break true if line =~ / maintainer /i break true if line =~ / author /i break true if line =~ / \w @ \w /i break true if line =~ / (?:^| )by:?  /i false end end
Detects if authorship line is included
Detects if authorship line is included
# "Maintainer(s): " # "Author(s): " # email address # "By John Doe"