class Precheck::CopyrightDateRule
Public Class Methods
Source
# File precheck/lib/precheck/rules/copyright_date_rule.rb, line 17 def self.description "using a copyright date that is any different from this current year, or missing a date" end
Source
# File precheck/lib/precheck/rules/copyright_date_rule.rb, line 9 def self.env_name "RULE_COPYRIGHT_DATE" end
Source
# File precheck/lib/precheck/rules/copyright_date_rule.rb, line 13 def self.friendly_name "Incorrect, or missing copyright date" end
Source
# File precheck/lib/precheck/rules/copyright_date_rule.rb, line 5 def self.key :copyright_date end
Public Instance Methods
Source
# File precheck/lib/precheck/rules/copyright_date_rule.rb, line 33 def lowercased_words_to_look_for [DateTime.now.year.to_s] end
Source
# File precheck/lib/precheck/rules/copyright_date_rule.rb, line 21 def pass_if_empty? return false end
Source
# File precheck/lib/precheck/rules/copyright_date_rule.rb, line 25 def supported_fields_symbol_set [:copyright].to_set end
Source
# File precheck/lib/precheck/rules/copyright_date_rule.rb, line 29 def word_search_type WORD_SEARCH_TYPES[:fail_on_exclusion] end