Why isn't anything put in the console?


#1

class Computer
@@users = Hash.new
def Computer.get_users()
return @@users
end

def create(filename)
    time = Time.now
    @files[fliename] = time
    puts "username, password, time"
end

def initialize(username, password)
    @username = username
    @password = password
    @files = Hash.new
    @@users[username] = password

end

end
my_computer = Computer.new("Me", "123")

I can't see my fault...


#2

This code only creates a class, and then creates an object of this class. That's it.

If you want to output something, then use print or puts to do it (or if you're talking about your create method, then call your create method).


#3

In your "create" method "filename" is spelled "fliename"