Class: Storexplore::ArrayUtils

Inherits:
Object
  • Object
show all
Defined in:
lib/storexplore/array_utils.rb

Class Method Summary collapse

Class Method Details

.contains?(array, other) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
29
30
# File 'lib/storexplore/array_utils.rb', line 26

def self.contains?(array, other)
  other.all? do |x|
    array.include?(x)
  end
end

.stringify(array) ⇒ Object



32
33
34
# File 'lib/storexplore/array_utils.rb', line 32

def self.stringify(array)
  array.map &:to_s
end