Pin error


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-32cN3/0/3?curriculum_id=5059f8619189a5000201fbcb


This pops up when I try to run my code:

Oops, try again.
It looks like your pin_error method doesn't return "Access denied: incorrect PIN."


class Account
    attr_reader :name, :balance
    
    def initialize(name, balance=100)
        @name = name
        @balance = balance
    end
    
    private
    
    def pin
        @pin=1234
    end
    
    private
    
    def pin_error
        puts "Access denied: incorrect PIN."
    end
    
end


#2

Sorry,

I fixed this by removing the 'puts' command


#3

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