This video gives a concise introduction to Object Orientation. There may be several concepts that you're unfamiliar with but in the subsequent lessons we will take a closer look at each of the topics covered and you'll have plenty of practice via labs.
- Explain how objects are metaphors for real life concepts
- Define a new class with the
class
keyword - Instantiate instances of the class with the class constructor
new
- Add attributes to our instances with setter/getter methods and instance variables
- Use the
attr_accessor
,attr_reader
andattr_writer
methods to dynamically create setter and getter methods - Keep track of all our class' instances with class variables and class methods
- Hook into an object's instantiation with #initialize
- Explain when to use implicit versus explicit receivers
- Define a class
find_by_name
method to find specific instances