Module: JamfRubyExtensions::Array::Predicates

Included in:
Array
Defined in:
lib/jamf/ruby_extensions/array/predicates.rb

Instance Method Summary collapse

Instance Method Details

#j_ci_include_string?(somestring) ⇒ Boolean Also known as: jss_ci_include_string?, j_ci_include?

A case-insensitive version of #include? for Arrays of Strings.

Parameters:

  • somestring (String)

    the String to search for

Returns:

  • (Boolean)

    Does the Array contain the String, ignoring case?



38
39
40
# File 'lib/jamf/ruby_extensions/array/predicates.rb', line 38

def j_ci_include_string?(somestring)
  any? { |s| s.to_s.casecmp? somestring }
end