10.5 expecting key word "end"


#1

It's driving me crazy, checked it, but it keeps saying there is something wrong with the keyword end:

"(ruby):24: syntax error, unexpected $end, expecting keyword_end"

My code is:
class Account
attr_reader :name, :balance
def initialize(name, balance=100)
@name = name
@balance = balance
end

private

def pin
@pin = 1234
end

def pin_error
pin_error.return puts "Access denied: incorrect PIN."
end

public
def display_balance(pin_number)
puts pin_number == pin ? "Balance: $#{@balance}." : pin_error
end

def withdraw(pin_number, amount)
if pin_number == pin
@balance -= amount
puts "Withdrew #{amount}. New balance: $#{@balance}."
else
puts pin_error
end
end


#2

Is there somebody that can help? It;s probably staring me in the face..


#3

Never mind, was indeed staring me right in the face


#4

unexpected $end, expecting keyword_end => need end to end mothod or class, check
end to end class