Easier ways to check all equips if not nil

Is there an easier way to optimize this code? The code checks if the player's equipment slots is not nil. I have different methods in each condition, but just in case there's a way to optimize it, please do tell.

$game_party.members.each do |player| if !player.equips[0].nil? if $game_system.get_money end end if !player.equips[1].nil? if $game_system.get_money end end if !player.equips[2].nil? if $game_system.get_money end end if !player.equips[3].nil? if $game_system.get_money end end if !player.equips[4].nil? if $game_system.get_money end end endI mean making if statement for each equipment seems to be a very noob move.
player.equips.map{|e| !e.nil?}.all?

Or something in this direction.

You can use any? instead to check for any equipment slot.

/edit: The above statement can be shortened. Since nil evaluates to false anyway, you can write:

Code:
player.equips.all?
Ahh that's way easier and shorter, thanks a lot. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/easier-ways-to-check-all-equips-if-not-nil.39514/