Class: Precheck::TextRule

Inherits:
Rule show all
Defined in:
precheck/lib/precheck/rule.rb

Overview

Rule types are more or less just marker classes that are intended to communicate what types of things each rule expects to deal with. TextRules deal with checking text values, URLRules will check url specific things like connectivity TextRules expect that text values will be passed to the rule_block, likewise, URLs are expected to be passed to the URLRule rule_block

Direct Known Subclasses

AbstractTextMatchRule, CurseWordsRule

Instance Attribute Summary

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, #key, #optional, #sensitive, #short_option, #skip_type_validation, #verify_block

Instance Method Summary collapse

Methods inherited from Rule

#check_item, #customize_with_data, default_value, description, env_name, #friendly_name, friendly_name, #initialize, #inspect, #item_field_supported?, key, #needs_customization?, #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_boolean_type_passes_validation, #ensure_generic_type_passes_validation, #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 Method Details

#handle_item?(item) ⇒ Boolean

Returns:

  • (Boolean)


161
162
163
# File 'precheck/lib/precheck/rule.rb', line 161

def handle_item?(item)
  item.kind_of?(TextItemToCheck) ? true : false
end