- Posted by nickp on December 16, 2005
Some of you may know that I like to play around with other programming languages, one of those being Ruby. I came across a t-shirt the other day and thought it was pretty funny. I modified it just a tad so you can run it from the console. Here it is:
class Programmer
def initialize(language)
@language = language
end
def happy?
@language =~ /ruby/ ? true : false
end
def make_happy!
puts @language = 'Ruby'
end
end
you = Programmer.new(gets)
unless you.happy?
you.make_happy!
end