lib/goby/entity/entity.rb
def print_inventory
      print "Current gold in pouch: #{@gold}.\n\n"

      if @inventory.empty?
        print "#{@name}'s inventory is empty!\n\n"
        return
      end

      puts "#{@name}'s inventory:"
      @inventory.each do |couple|
        puts "* #{couple.first.name} (#{couple.second})"
      end
      print "\n"
    end
# Prints the inventory in a nice format.
Prints the inventory in a nice format.
Prints the inventory in a nice format .
def print_inventory
      print "Current gold in pouch: #{@gold}.\n\n"
      if @inventory.empty?
        print "#{@name}'s inventory is empty!\n\n"
        return
      end
      puts "#{@name}'s inventory:"
      @inventory.each do |couple|
        puts "* #{couple.first.name} (#{couple.second})"
      end
      print "\n"
    end
def print_inventory print "Current gold in pouch: #{@gold}.\n\n" if @inventory . empty? print "#{@name}'s inventory is empty!\n\n" return end puts "#{@name}'s inventory:" @inventory . each do | couple | puts "* #{couple.first.name} (#{couple.second})" end print "\n" end
Prints the inventory in a nice format.
Prints the inventory in a nice format .