Created
August 9, 2009 20:36
-
-
Save jerodsanto/164893 to your computer and use it in GitHub Desktop.
This file contains 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
require 'date' | |
class Santo | |
def is_awesome? | |
true | |
end | |
def birthday_today? | |
today = Date.today | |
today.month == bday.month && today.day == bday.day | |
end | |
end | |
class Michael < Santo | |
def bday | |
Date.new(1990,8,10) | |
end | |
end | |
class Jerod < Santo | |
def tell(person,something) | |
puts"Yo #{person.class}, #{something}" | |
end | |
end | |
michael = Michael.new | |
jerod = Jerod.new | |
if michael.birthday_today? && michael.is_awesome? | |
jerod.tell(michael,"Happy Birthday!") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment