Object Oriented Programming (OOP) in Ruby: What is it Exactly?

Image for post
Image for post

What Is Object Oriented Programming?

Image for post
Image for post
Image for post
Image for post
Events are something you’ll come across when working with UI /FrontEnd frameworks…

What Are The Four Pillars of OOP?

Image for post
Image for post

Encapsulation

Image for post
Image for post
A method encapsulating individual pieces of code that deal with the action of starting a car.

Abstraction

Image for post
Image for post
Abstract art for an abstract topic | Painter: Wassily Kandinsky
Image for post
Image for post
Although this image is for OOP in Python, Classes and Objects operate the same as in Ruby

Inheritance

Image for post
Image for post
Image from geeksforgeeks.org

Polymorphism

Image for post
Image for post
Polymorphism is essentially creating something that can have multiple uses(implementations)

What is the importance of using OOP?

Summary

A coding and motorcycle enthusiast who’s passionate about personal development and learning. Recent Flatiron School of Software Engineering graduate.