lib/goby/entity/entity.rb
# Unequips the specified item from the entity's outfit.
#
# @param [Item, String] item the item (or its name) to unequip.
Unequips the specified item from the entity's outfit.
Unequips the specified item from the entity ' s outfit .
def unequip_item(item)
      pair = @outfit.detect { |type, value| value.name.casecmp(item.to_s).zero? }
      if pair
        item = pair[1]
        item.unequip(self)
        add_item(item)
      else
        print NOT_EQUIPPED_ERROR
      end
    end
def unequip_item ( item ) pair = @outfit . detect { | type , value | value . name . casecmp ( item . to_s ) . zero? } if pair item = pair [ 1 ] item . unequip ( self ) add_item ( item ) else print NOT_EQUIPPED_ERROR end end
Unequips the specified item from the entity's outfit.
Unequips the specified item from the entity ' s outfit .
# On a successful find, the "detect" method always returns # an array of length 2; thus, the following line should not fail.
item
item the item (or its name) to unequip.
item the item ( or its name ) to unequip .