Skip to content

Instantly share code, notes, and snippets.

@rafer
Last active December 19, 2015 19:08
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafer/6003505 to your computer and use it in GitHub Desktop.
Save rafer/6003505 to your computer and use it in GitHub Desktop.
# 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.
@jumph4x
Copy link

jumph4x commented Jul 15, 2013

Fack

@coreyhaines
Copy link

YES!

@evilmarty
Copy link

Now we can drop private and protected methods and have them as multi-line methods instead.

@guipdutra
Copy link

Just did a instacode of this http://instacod.es/77752

@richo
Copy link

richo commented Jul 16, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment