class Precheck::CustomTextRule
Attributes
Public Class Methods
Source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 19 def self.description "mentioning any of the user-specified words passed to #{self.key}(data: [words])" end
Source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 11 def self.env_name "RULE_CUSTOM_TEXT" end
Source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 15 def self.friendly_name "No user-specified words are included" end
Source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 7 def self.key :custom_text end
Public Instance Methods
Source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 31 def customize_with_data(data: nil) @data = data.map { |word| word.strip.downcase } end
Source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 27 def lowercased_words_to_look_for return @data end
Source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 23 def needs_customization? return true end