I would like this exercise response


#1

Hi

I would like this exercise response:

class Account 
   attr_reader :name, :balance
    def initialize(name, balance=100)
        @name = name
        @balance = balance    
    end
    
private 
    def pin
        @prin = 1234
    end
    
    def pin_error
        @pin_error = "Acesso negado: PIN incorreto."
    end

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

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

end

#2

Should this be @pin = ...?

... pin_number

Indentation?

    def ...
        puts ...
    end

The last function has indentation isssues, as well.