5. Getting More Creative - Need help!


#1



Code doesn't seem to be working. I've tried fiddling around with it but I get the same error message:
Oops, try again. Did you add a create method to your Computer class?

Can anyone help??


class Computer
    @@users = {}
    def initialize(username, password)
        @username = username 
        @password = password
        @files = {}
        @@users[username] = password
    end 
end 


def create(filename)
    time = Time.now
   @files[filename] = time 
    puts "Your file has been created!"
  end


#2

Add an end statement after your final one


#3

I already tried that and it didn't work


#4

You are only supposed to have one end statement here but two at the end of your code,


#5

Ohhh - sorry! I've corrected it now and it works!

Thank you! :slight_smile:


#6

You're welcome :slight_smile:


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.