Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Alphonse Cuccurullo
Alphonse Cuccurullo
2,513 Points

It's telling me the Constant is uninitialized but i thought i did that.

class Cuccurullo 
    def initialize(name,age,occupation)
        @name = name
        @age = age
        @occupation = occupation
    end

    def bio
        case @name
            when "Alphonse","alphonse" then puts "This man is crazy but funny"
            when "Linda","linda" then puts "Lady is nut's but is loving in her own way"
            when "Dad","dad" then puts "The greatest man in the world great heart and deserves nothing but the best"
            when "Nick","nick" then puts "Your baby brother thankfully doesn't take after his older brother"
        end
    end

    def age
        if @age == 25 && @occupation == false
        puts "Start acting right"
end

end

class Morales < Cuccurullo
    def initialize(name, age, occupation)
        @name = name
        @age = age 
        @occupation = occupation
        super
    end


    def age
        super
    end

end
end

mor = Morales.new("Nelson",25,false)
mor.age

Im trying to have Morales inherit from the Cuccurullo class.

Jay Padzensky
Jay Padzensky
4,731 Points

Admin edit: puts string edited for removal of potentially inappropriate language OP, if you have questions, please feel free to email Support at help@teamtreehouse.com and reference this thread. Thank you.