Method: Primer::Classify::Utilities.supported_selector?

Defined in:
lib/primer/classify/utilities.rb

.supported_selector?(selector) ⇒ Boolean

Does the given selector exist in the utilities file

returns Boolean

Returns:

  • (Boolean)

71
72
73
74
75
76
# File 'lib/primer/classify/utilities.rb', line 71

def supported_selector?(selector)
  # This method is too slow to run in production
  return false unless validate_class_names?

  find_selector(selector).present?
end