Last active
December 19, 2015 19:08
-
-
Save rafer/6003505 to your computer and use it in GitHub Desktop.
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
# coding: utf-8 | |
# Can ruby have method names have newlines/be crazy? | |
class BadKitty | |
FACE = " | |
|\\_/| | |
/ @ @ \\ | |
( > º < ) | |
`>>x<<´ | |
/ O \\ " | |
define_method(FACE) do | |
puts "BAD KITTY" | |
end | |
end | |
BadKitty.new.send(BadKitty::FACE) | |
puts BadKitty.new.methods # Well shit. |
YES!
Now we can drop private and protected methods and have them as multi-line methods instead.
Just did a instacode of this http://instacod.es/77752
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fack