class Precheck::CustomTextRule

Attributes

data[RW]

Public Class Methods

description() click to toggle 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
env_name() click to toggle source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 11
def self.env_name
  "RULE_CUSTOM_TEXT"
end
friendly_name() click to toggle source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 15
def self.friendly_name
  "No user-specified words are included"
end
key() click to toggle source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 7
def self.key
  :custom_text
end

Public Instance Methods

customize_with_data(data: nil) click to toggle 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
lowercased_words_to_look_for() click to toggle source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 27
def lowercased_words_to_look_for
  return @data
end
needs_customization?() click to toggle source
# File precheck/lib/precheck/rules/custom_text_rule.rb, line 23
def needs_customization?
  return true
end