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 trialrobrattray
4,666 PointsWhy the need to initialize and calling methods
Hi Team,
Maybe I am missing a key element of objects and methods but I am confused as to why you need to initialize AND call a method. It seems repetitive that you need to initialize, define, and then call.
Can someone explain it the process a more clearly or point me to a resource that will explain the steps in the process in more detail.
please note I am trying to understand the base process before moving in to attr_accessor stuff.
Thanks, Rob
1 Answer
Maciej Czuchnowski
36,441 PointsExplaining this properly would a long time. You will need to use other materials if these videos are not clear enough (which is OK, I always said that Treehouse videos are not always good for beginners). You could try Codecademy chapters on object-oriented programming, maybe this will clear some things for you: http://www.codecademy.com/courses/ruby-beginner-en-MFiQ6/0/1?curriculum_id=5059f8619189a5000201fbcb
If not, I recommend some more general CS courses like Harvard's CS50x or Stanford's CS106a (all available for free online, even on YouTube, but they use C and Java, not Ruby).