4.Private keep out!


#1

class Dog
    def initialize(name,breed)
        @name = name
        @breed = breed
    public
    def bark 
        puts "Woof!"
   private
   def id
       @id_number = 12345
   end
 end

its still showing some problem....why is it?


#2

Please post a link to the exercise, and the error message. Thank you.


#3

I suspect it is because there is no end to close the initialize method.

    def initialize(name,breed)
        @name = name
        @breed = breed
    end

Likewise,

    def bark 
        puts "Woof!"
    end

#4

You were write i did not write end after puts "woof!".thank you