Ruby newbie here! I have a beginners challenge for a very basic password manager that I've had a complete mind blank trying to solve. One of the methods that needs to be defined is that it can ensure all service names and passwords are unique.
Snippet below is where the first version from a previous challenge left off which I THINK will help as a foundation to build on (I've added a comment line where I think the additional pieces will go from there).
def initialize @passwords = {} end def add(service, password) #something here to check hash before adding to @passwords hash????? return @passwords[service] = password end end def services @passwords.keys end end Any pointers greatly appreciated! Do let me know if any further context is needed etc. First time reaching out in here so still getting used to it all!
Thanks folks :)