Created
May 22, 2012 14:47
-
-
Save giddie/2769522 to your computer and use it in GitHub Desktop.
A bit of fun for Dave :)
This file contains hidden or 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
Ruby = 'Ruby' | |
class Kitson | |
def initialize(name) | |
puts "There is a new Kitson named #{name.capitalize}." | |
end | |
def is_enjoying?(something) | |
ret = (something == 'Ruby') | |
print "He " | |
if ret | |
print "definitely enjoys" | |
else | |
print "doesn't enjoy" | |
end | |
puts " #{something}." | |
end | |
end | |
Kitson.new(:dave).is_enjoying?(Ruby) | |
print 'Press <enter> to close...' | |
gets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is really just for a laugh, to make the
Kitson.new
... line actually do something. Not the best example of programming otherwise, except to illustrate that you can get away with pretty much anything in Ruby :)