igrigorik / ruby2lolz
- Source
- Commits
- Network (1)
- Issues (0)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
README.rdoc | Sat Dec 12 13:28:33 -0800 2009 | |
| |
Rakefile | Sat Dec 12 13:19:40 -0800 2009 | |
| |
VERSION | Sat Dec 12 13:12:30 -0800 2009 | |
| |
lib/ | Sat Dec 12 13:19:40 -0800 2009 | |
| |
spec/ | Sat Dec 12 13:19:40 -0800 2009 |
README.rdoc
Ruby2Lolz translates Ruby code into LOLCODE (www.lolcode.com)
Translating Ruby Hash & Array:
require 'ruby2lolz'
# adds Hash.to_lolz, and Array.to_lolz
puts {:nickname => [:ig, :igrigorik]}.to_lolz
OH HAI
I CAN HAS Nickname
I CAN MANY HAZ
AWSUM VAR
ig
KTHNX.
AWSUM VAR
igrigorik
KTHNX.
KTHNXBYE.
KTHNX.
KTHNXBYE.
Put some Lolz into your API
Translating a class:
class Simple
def add(n1, n2)
return n1 + n2
end
end
Ruby2Lolz.translate(Simple, :add)
HOW DUZ I HAZ add [YR n1, YR n2]
(n1 + n2)
IF U SAY SO