1 00:00:00,630 --> 00:00:03,700 Hello and welcome to this to make sure end this lecture. 2 00:00:03,720 --> 00:00:09,650 I'm going to briefly explain what objects are in Ruby Ruby. 3 00:00:09,690 --> 00:00:14,800 Honey object is basically any piece of data. 4 00:00:14,820 --> 00:00:20,590 One example the number seven can be referred to as an object or this string. 5 00:00:20,670 --> 00:00:25,220 Hello can also be referred to as an object. 6 00:00:25,230 --> 00:00:29,660 So all these are examples of what it's seven minus five. 7 00:00:29,760 --> 00:00:33,200 Hello World Book car. 8 00:00:33,270 --> 00:00:39,540 These are all pieces of data and they are referred to as objects. 9 00:00:39,540 --> 00:00:48,750 So Ruby is an object oriented programming language so it treats everything as an object an object also 10 00:00:48,750 --> 00:00:51,510 can have properties. 11 00:00:51,720 --> 00:00:53,550 For example the object. 12 00:00:53,560 --> 00:00:55,350 Hello. 13 00:00:55,620 --> 00:01:00,680 One of the properties you can see there is that the first letter is uppercase. 14 00:01:00,700 --> 00:01:02,530 Now is there is a distinction. 15 00:01:02,550 --> 00:01:13,200 So a feature of that object the object has five letters also is key property which distinguish all which 16 00:01:13,210 --> 00:01:22,440 you can use to describe that object and object can also have an action that is something you do to that 17 00:01:22,500 --> 00:01:25,200 object an object is referred to. 18 00:01:25,200 --> 00:01:32,250 You can look at the intent of the English language an object is a noun and a noun also can have it do 19 00:01:32,250 --> 00:01:34,010 in word which is a verb. 20 00:01:34,200 --> 00:01:43,560 So in this case hello there is the object and we can get the hello to perform an action or to do something. 21 00:01:43,560 --> 00:01:51,090 For example here this is the simple Ruby statement that says put her low dot reverse to what that statement 22 00:01:51,090 --> 00:01:56,650 is saying if that is telling the object to reverse itself so it rules. 23 00:01:56,670 --> 00:01:59,180 Turn the letters upside down. 24 00:01:59,250 --> 00:02:01,300 That's basically what it is saying. 25 00:02:01,560 --> 00:02:06,830 So in the real world you can also have objects like a car. 26 00:02:07,230 --> 00:02:14,730 So a car is an object and it will have properties and the properties can include a make your the car 27 00:02:15,180 --> 00:02:17,510 a model a car lot. 28 00:02:17,510 --> 00:02:18,700 A price. 29 00:02:18,780 --> 00:02:22,750 Also the object will also have an action. 30 00:02:22,860 --> 00:02:32,020 It performs some programming language called Method and the action could include start drive and park. 31 00:02:32,310 --> 00:02:35,340 So that's basically how objects work. 32 00:02:35,340 --> 00:02:38,330 Another illustration from objects could be a book. 33 00:02:38,850 --> 00:02:46,400 So a book is some object and the property is horsewhipping close title or four pages. 34 00:02:46,710 --> 00:02:50,820 Why the actions the book can have could be read. 35 00:02:50,820 --> 00:02:52,070 You can read the book. 36 00:02:52,410 --> 00:02:53,490 You're doing something to it. 37 00:02:53,490 --> 00:02:54,720 You read it. 38 00:02:54,840 --> 00:03:02,400 Another thing you can do to the book is buy it so that it's an action or method seeking look at actions 39 00:03:02,400 --> 00:03:10,920 or methods as verbs because they're doing works and you can look at objects as nouns So that's it for 40 00:03:10,920 --> 00:03:13,770 this brief illustration of optics. 41 00:03:13,770 --> 00:03:22,740 Just remember that everything in Ruby isn't up to any piece of data is referred to as an object. 42 00:03:22,740 --> 00:03:23,940 Thanks for watching. 43 00:03:23,940 --> 00:03:24,830 Bye for now.