6. Who are the users (Class Method)


The code seems to pass yet I still get this error message: "Oops, try again. Did you add a get_users method to your Computer class?"

Here is my code:

class Computer
    @@users = {}
    def initialize(username, password)
        @files = files.Hash
        @@users[username] = password
    def create(filename)
        time = Time.now
        @files[filename] = time
        puts "#{username} created #{filename} at #{time}."
    def Computer.get_user
        return @@users

Any suggestions?



It's also created differently from the other methods, but I don't know what it's supposed to look like


Wow, missed the "s" on users. What a simple mistake. Thanks!


Your method name is missing an s at the end. .get_users. Since the method is so simple, only one line, we can use the implicit return:

    def Computer.get_users


Spend three times as much time tracking down lessons as I do writing answers. What a pain. Wish members would post a link with their questions. It would make life so much easier for everyone, and get them the help they need much faster.