Using Libraries
Learn about Ruby libraries and how to use them.
Our Person
class doesn’t define an attribute accessor method for its password, and therefore, others can’t ask for and retrieve it.
However, our person
object could freely give them an encrypted version of it.
This is pretty similar to how authentication often works in real web applications:
Applications don’t store our actual password in plain text (hopefully). That way, if they get hacked, attackers wouldn’t have our actual password. Instead, they store an encrypted version of the password. ...