class Computer
@@users = {}
def initialize(username, password)
@username = username
@password = password
@files = {}
@@users[username] = password
end
def create(filename)
@filename = filename
@time = Time.now
@files[filename] = @time
puts "A new file was created: #{@filename} #{@username} #{@time}"
end
end
No comments:
Post a Comment