Created
February 18, 2015 03:01
-
-
Save avdi/2c2f919714330d21ed38 to your computer and use it in GitHub Desktop.
Short methods, long names
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
RUBY_VERSION # => "2.1.5" | |
m = define_method %^ | |
puts "The coding standard says 'long methods are bad'." | |
puts "Stupid coding standards. What do they know?" | |
puts "It says long method names are OK though." | |
puts "Suckers!" | |
^ do | |
eval(__callee__.to_s) | |
end | |
send m | |
# >> The coding standard says 'long methods are bad'. | |
# >> Stupid coding standards. What do they know? | |
# >> It says long method names are OK though. | |
# >> Suckers! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment