Why isn't anything put in the console?


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

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

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


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

I can't see my fault...


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).


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