Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def ¿
puts 'IMA UPSIDEDOWN QUESTIONMARK LOL'
end
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
¿ # => IMA UPSIDEDOWN QUESTIONMARK LOL
module SpanishTheShitOutOfThis
def method_missing(method, args)
if method /^¡|¿(.+)/
send $1, *args
else
super
end
end
end
class Thingo
include SpanishTheShitOutOfThis
def que?
"foo"
end
def muy_bien!
"shit yeah!"
end
end
t = Thingo.new
t.¿que? # => "foo"
t.¡muy_bien! # => "shit yeah!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment