sant0sk1 (owner)

Revisions

gist: 164893 Download_button fork
public
Public Clone URL: git://gist.github.com/164893.git
Embed All Files: show embed
bday.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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