Last active
December 18, 2015 06:10
-
-
Save jpotts18/1f4269c9e1f22c963a0d 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 MorningAlgorithm | |
# This method is used to encapsulate the algorithm's general process. | |
# Notice this method is not concerned how the methods are accomplished | |
def execute | |
wake_up | |
workout | |
eat_breakfast | |
drive_to_work | |
end | |
def wake_up | |
puts "Get up you lazy bum" | |
end | |
def workout | |
puts "1, 2, 3... That should work" | |
end | |
def eat_breakfast | |
puts "Mmm mmm tasty" | |
end | |
def drive_to_work | |
puts "Good morning crazy drivers!" | |
end | |
end | |
morning = MorningAlgorithm.new() | |
morning.execute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment