WEBVTT

1
00:00:00.000 --> 00:00:00.930
let's go ahead and fix up our name class
with the different name attributes.

2
00:00:02.450 --> 00:00:04.830
Now this pattern that we see right here,

3
00:00:04.830 --> 00:00:10.620
where we are setting instance variables,
and then calling them later.

4
00:00:10.620 --> 00:00:13.240
It's something that's done quite a bit in
Ruby.

5
00:00:13.240 --> 00:00:18.150
And Ruby actually gives us a shortcut for
doing this exact thing.

6
00:00:19.420 --> 00:00:26.990
The shortcut is using a method called
attr_reader which stands for

7
00:00:26.990 --> 00:00:28.860
attribute reader.

8
00:00:28.860 --> 00:00:30.000
Now let's try it right here.
