# Intro to Object Orientation - Ruby

## Intro to Object Orientation - Ruby - Review Lecture

### Objectives:

* Define a new class using the `class` keyword.
* Instantiate instances of the class with the class constructor `new`.
* Add instance methods to your class with `def` in the body of the class.
* Set instance variables through writer instance methods.
* Identify the scope of an instance variable.
* Read an instance variable through a reader instance method.
* Use `attr_accessor` to define reader and writer methods for attributes.
* Hook into an object's instantiation with `#initialize`.

### Video

&#x20;\<iframe width="100%" height="720" src="<https://www.youtube.com/embed/UysgBTrJoTc?rel=0&showinfo=0>" frameborder="0" allowfullscreen>\</iframe>

[Direct link to MP4.](http://learn-co-videos.s3.amazonaws.com/ruby/Intro.to.OO.ruby.LV.mp4)

*This video is meant to be a review of the first few topics in Object Orientation in Ruby.*

View [Intro to Object Orientation - Ruby - Review Lecture](https://learn.co/lessons/intro-to-object-orientation-ruby) on Learn.co and start learning to code for free.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://certil-remy.gitbook.io/learn/oop-ruby/untitled-5.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
