@pablobm commented on this pull request.


> @@ -0,0 +1,57 @@
+# frozen_string_literal: true
+
+module Tag2link
+  class << self

Yeah, long story but `private` doesn't apply to singleton methods, which is 
what those `def self.method_name` do and allows us to get class methods. The 
`class << self` thing is common in this type of function-wrapper modules, but I 
agree it may not be appropriate in a project like this one, where we want to 
encourage contributions from non-Rubyists.

A slight improvement would be to do `private_class_method def 
self.choose_best_item(items)`, all in one line, which avoids splitting this 
declaration into two lines.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6470#discussion_r2472501848
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6470/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to