Class: Array

Inherits:
Object show all
Includes:
JamfRubyExtensions::Array::Predicates, JamfRubyExtensions::Array::Utils
Defined in:
lib/jamf/ruby_extensions/array.rb

Overview

an array

Instance Method Summary collapse

Instance Method Details

#j_ci_fetch(somestring) ⇒ String? Also known as: jss_ci_fetch_string Originally defined in module JamfRubyExtensions::Array::Utils

Fetch a string from an Array case-insensitively, e.g. if my_array contains ‘thrasher’,

my_array.j_ci_fetch('ThRashEr')

will return ‘thrasher’

returns nil if no match

Parameters:

  • somestring (String)

    the String to search for

Returns:

  • (String, nil)

    The matching string as it exists in the Array, nil if it doesn’t exist

#j_ci_include_string?(somestring) ⇒ Boolean Also known as: jss_ci_include_string?, j_ci_include? Originally defined in module JamfRubyExtensions::Array::Predicates

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?