Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

arnavthecoder
3,453 PointsHow to write the property for ruby in bling.h code challenge
Hi all,
How do I write a property for ruby in bling.h. I gives me an error saying "Did you forget to add the ruby property?"
Thanks in advance..
@interface Gem : NSObject
@end
@interface Ruby : Gem
@end
@interface Bling : NSObject
@end
1 Answer

Caleb Kleveter
Treehouse Moderator 37,862 PointsThe code looks like this:
@property(nonatomic, strong) Ruby *ruby;
When you create a property you have @property(), filling in the parentheses with the proper arguments, then you have the name of the class that the property inherits from, then an star (or however you spell the other name for it), the name of the property then a semi-colon.
arnavthecoder
3,453 Pointsarnavthecoder
3,453 PointsThank you so much Caleb Kleveter!