Created
October 27, 2018 05:27
-
-
Save clarkngo/fd6c86348d83fc0991e891a50c2cb00f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person | |
| def initialize | |
| end | |
| def eat | |
| puts "Nom, nom, nom" | |
| end | |
| def sleep | |
| puts "Need to sleep and recharge" | |
| end | |
| end | |
| class Worker < Person | |
| def work | |
| puts "I have a job 9-5 pm.. I LOVE my job.." | |
| end | |
| end | |
| class Developer < Worker | |
| def code | |
| puts "I can build an app for you! There's a bug.. Um.. a feature!" | |
| end | |
| end | |
| class FrontEndDev < Developer | |
| def front_end | |
| puts "Building.. User interface" | |
| end | |
| end | |
| class BackEndDev < Developer | |
| def back_end | |
| puts "Creating and Connecting to the database" | |
| end | |
| end | |
| person = Person.new | |
| developer = Developer.new | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment