Created
April 3, 2012 16:29
-
-
Save babney/2293388 to your computer and use it in GitHub Desktop.
Like, Ruby
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
module LikeRuby | |
VALLEYGIRL = %w[omg so like totally right toootally stuff] | |
FRATGUY = %w[friggin fuckin dude man bro broheim broseph] | |
INTERNETS = %w[lol rofl teh ohai plz] | |
SNOOP = %w[yo homey homeboy sup dog shit girl ma biatch ho shiiit] | |
LOCAL = %w[wicked hella anyways] | |
MISC = %w[just hey yeah ok um uh ah actually something] | |
ALLSLANG = VALLEYGIRL + FRATGUY + INTERNETS + SNOOP + LOCAL + MISC | |
def method_missing(name, *args) | |
if ALLSLANG.include?(name.to_s) | |
if !args[0].nil? | |
if args[0].is_a? Symbol | |
self.send(args[0], *args[1..-1]) | |
else | |
return args[0] | |
end | |
end | |
else | |
super | |
end | |
end | |
end | |
class Object | |
include LikeRuby | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1