Method: Array#nothing?

Defined in:
lib/extra_lib/core_ext/array.rb

#nothing?Boolean

Similar to String#nothing?, except it joins all the elements first and does the same check.

Example: <tt>[“ ”, “ ”, “”].nothing? #=> true<tt>

Returns: True or false.

Returns:

  • (Boolean)


35
36
37
# File 'lib/extra_lib/core_ext/array.rb', line 35

def nothing?
	join('').strip.empty?
end