DEV Community

Akhil
Akhil

Posted on • Edited on

1

Ruby 2.8 adds endless method definition

Ruby 2.8 adds endless method definition

Top comments (1)

Collapse
 
codeandclay profile image
Oliver

Endless method definition is a mind-twister of a term but I like the idea of defining methods with the assignment operator. It's a nice halfway between using instance vars that do a bit more than attr_accessors and methods. On the other hand, when I scan Ruby by eye, my eye skips to the next line as soon as I've read def method_name and endless methods make it a bit harder for my brain to scan them (though, that's only habit).

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay