Skip to content

Instantly share code, notes, and snippets.

@jerodsanto
Created August 9, 2009 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jerodsanto/164893 to your computer and use it in GitHub Desktop.
Save jerodsanto/164893 to your computer and use it in GitHub Desktop.
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