Created
February 27, 2011 10:41
-
-
Save halfninja/846080 to your computer and use it in GitHub Desktop.
Silly extension to Ruby grammar
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
%w(so like totally whatever whatever? um uh yeah stuff dude shit but no cos).each do |word| | |
instance_eval %{def #{word}(w=nil); w; end} | |
end | |
# now you can code like this: | |
so like x = 3 and shit | |
um yeah so puts x or whatever? | |
yeah but no but yeah but no cos x = 3 or whatever |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment