Video Review: Object Properties
Last updated
Last updated
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
18 lines (12 sloc) 958 Bytes
This Q&A led by Avi Flombaum gives a comprehensive review of object properties.
Define local methods specific to an instance
Define instance methods for all instances of a class
Use attr_accessor macro to dynamically add setter and getter methods for our class instances
Define a class method that will create instance methods for the class from a list of arguments
Write the code behind the attr_accessor class method
Set an instance attribute to a primitive object and a mature object
Configure two classes to collaborate with each other and develop relationships
<iframe width="100%" height="720" src="" frameborder="0" allowfullscreen></iframe>
View on Learn.co and start learning to code for free.