Skip to content

Instantly share code, notes, and snippets.

@halfninja
Created February 27, 2011 10:41
Show Gist options
  • Save halfninja/846080 to your computer and use it in GitHub Desktop.
Save halfninja/846080 to your computer and use it in GitHub Desktop.
Silly extension to Ruby grammar
%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