| Module | Aquarium::Utils::ArrayUtils |
| In: |
lib/aquarium/utils/array_utils.rb
|
# 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.
# File lib/aquarium/utils/array_utils.rb, line 26
26: def self.strip_array_nils array
27: array.to_a.compact
28: end
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 [].
# 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