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

Uninitialized constant?

Heres my code:

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 " get your stuff together"

end

end

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

end end

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

Im trying to get the Morales class to inherit from the Cuccurullo class but it's giving me the constant issue. I thought super would do the trick in terms of the constructor.