Class: WayOfWorking::ReadmeBadge::GithubAuditRule

Inherits:
Audit::Github::Rules::Base
  • Object
show all
Defined in:
lib/way_of_working/readme_badge/github_audit_rule.rb

Overview

This rule checks for a README and Way of Working badge.

Instance Method Summary collapse

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


10
11
12
13
14
15
# File 'lib/way_of_working/readme_badge/github_audit_rule.rb', line 10

def valid?
  @errors << 'No README' if readme_content.nil?
  @errors << 'No Way of Working README Badge' unless readme_way_of_working_badge?

  @errors.empty? ? :passed : :failed
end