Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Regarding "def self.method" vs. "class << self; def method; end", one very big advantage of using the "class << self" technique (which Github discourages) is that it allows grepping for "def method" to find the location of the method definition.

Perhaps my editor is old and featureless (and Ruby's dynamic nature doesn't help), but I grep for such things multiple times per day.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: