Skip to Content
Banking on Ruby
Private Affairs

Let’s go ahead and create our private methods. (It makes sense to create these first, since our public methods will rely on them.)



Add two private methods to your Account class, pin and should take no arguments and set an instance variable, @pin, equal to the PIN number 1234.

pin_error should take no arguments and should simply return the string "Access denied: incorrect PIN."

Folder Icon

Take this course for free

Already have an account?