This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/ruby | |
# This program takes a list of users, their desires, and their possessions. | |
# Then it asks for a particular user and matches them with the best user | |
# for their desires. | |
class User | |
attr_reader :has, :wants | |
attr_accessor :score | |
def initialize (has=[], wants=[]) | |
@score = 0 |