Class: Precheck::CustomTextRule
- Inherits:
-
AbstractTextMatchRule
- Object
- FastlaneCore::ConfigItem
- Rule
- TextRule
- AbstractTextMatchRule
- Precheck::CustomTextRule
- Defined in:
- precheck/lib/precheck/rules/custom_text_rule.rb
Constant Summary
Constants inherited from AbstractTextMatchRule
AbstractTextMatchRule::WORD_SEARCH_TYPES
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Attributes inherited from FastlaneCore::ConfigItem
#allow_shell_conversion, #code_gen_default_value, #code_gen_sensitive, #conflict_block, #conflicting_options, #default_value, #default_value_dynamic, #deprecated, #description, #display_in_shell, #env_name, #env_names, #key, #optional, #sensitive, #short_option, #skip_type_validation, #verify_block
Class Method Summary collapse
Instance Method Summary collapse
- #customize_with_data(data: nil) ⇒ Object
- #lowercased_words_to_look_for ⇒ Object
- #needs_customization? ⇒ Boolean
Methods inherited from AbstractTextMatchRule
#allowed_lowercased_words, #pass_if_empty?, #remove_safe_words, #rule_block, #word_search_type
Methods inherited from TextRule
Methods inherited from Rule
#check_item, default_value, #friendly_name, #handle_item?, #initialize, #inspect, #item_field_supported?, #perform_check, #rule_block, #skip_item_not_meant_for_this_rule, #supported_fields_symbol_set, #to_s
Methods inherited from FastlaneCore::ConfigItem
#auto_convert_value, #data_type, #deprecated_description, #doc_default_value, #ensure_array_type_passes_validation, #ensure_boolean_type_passes_validation, #ensure_generic_type_passes_validation, #fetch_env_value, #help_default_value, #initialize, #is_string, #string?, #to_s, #update_code_gen_default_value_if_able!, #valid?, #verify!
Constructor Details
This class inherits a constructor from Precheck::Rule
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'precheck/lib/precheck/rules/custom_text_rule.rb', line 5 def data @data end |
Class Method Details
.description ⇒ Object
19 20 21 |
# 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 ⇒ Object
11 12 13 |
# File 'precheck/lib/precheck/rules/custom_text_rule.rb', line 11 def self.env_name "RULE_CUSTOM_TEXT" end |
.friendly_name ⇒ Object
15 16 17 |
# File 'precheck/lib/precheck/rules/custom_text_rule.rb', line 15 def self.friendly_name "No user-specified words are included" end |
.key ⇒ Object
7 8 9 |
# File 'precheck/lib/precheck/rules/custom_text_rule.rb', line 7 def self.key :custom_text end |
Instance Method Details
#customize_with_data(data: nil) ⇒ Object
31 32 33 |
# 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 ⇒ Object
27 28 29 |
# File 'precheck/lib/precheck/rules/custom_text_rule.rb', line 27 def lowercased_words_to_look_for return @data end |
#needs_customization? ⇒ Boolean
23 24 25 |
# File 'precheck/lib/precheck/rules/custom_text_rule.rb', line 23 def needs_customization? return true end |