Module Aquarium::Utils::ArrayUtils
In: lib/aquarium/utils/array_utils.rb

Methods

Public Class methods

[Source]

    # File lib/aquarium/utils/array_utils.rb, line 16
16:       def self.make_array *value_or_enum
17:         strip_array_nils do_make_array(value_or_enum)
18:       end

Return a copy of the input array with all nils removed.

[Source]

    # File lib/aquarium/utils/array_utils.rb, line 26
26:       def self.strip_array_nils array
27:         array.to_a.compact
28:       end

Public Instance methods

Return an array containing the input item or list of items. If the input is an array, it is returned. In all cases, the constructed array is a flattened version of the input and any nil elements are removed by strip_array_nils. Note that this behavior effectively converts nil to [].

[Source]

    # File lib/aquarium/utils/array_utils.rb, line 12
12:       def make_array *value_or_enum
13:         ArrayUtils.make_array value_or_enum
14:       end

Return a copy of the input array with all nils removed.

[Source]

    # File lib/aquarium/utils/array_utils.rb, line 21
21:       def strip_array_nils array
22:         ArrayUtils.strip_array_nils array
23:       end

[Validate]