Skip to content

Instantly share code, notes, and snippets.

@jpotts18
Last active December 18, 2015 07:32
Show Gist options
  • Save jpotts18/19e030dafe397cef8802 to your computer and use it in GitHub Desktop.
Save jpotts18/19e030dafe397cef8802 to your computer and use it in GitHub Desktop.
# This gist is a continuation of a previous gist which defines the MorningAlgorithm class
# https://gist.github.com/jpotts18/1f4269c9e1f22c963a0d
class LateMorningAlgorith < MorningAlgorithm
def work_out
puts "Nope..."
end
def eat_breakfast
puts "Grab banana and go!"
end
end
late_morning = LateMorningAlgorithm.new
late_morning.execute
# The LateMorningAlgorithm.execute template method will call the following methods from the following classes
# wake_up - MorningAlgorithm
# work_out - LateMorningAlgorithm
# eat_breakfast - LateMorningAlgorithm
# drive_to_work - MorningAlgorithm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment