<p></p>
<p><b>@pablobm</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6470#discussion_r2472501848">lib/tag2link.rb</a>:</p>
<pre style='color:#555'>> @@ -0,0 +1,57 @@
+# frozen_string_literal: true
+
+module Tag2link
+ class << self
</pre>
<p dir="auto">Yeah, long story but <code class="notranslate">private</code> doesn't apply to singleton methods, which is what those <code class="notranslate">def self.method_name</code> do and allows us to get class methods. The <code class="notranslate">class << self</code> 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.</p>
<p dir="auto">A slight improvement would be to do <code class="notranslate">private_class_method def self.choose_best_item(items)</code>, all in one line, which avoids splitting this declaration into two lines.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6470#discussion_r2472501848">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNCIU6IYUFO22IR5ID32CKZXAVCNFSM6AAAAACKBQTVXSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTGOJSGY3TCNRWHA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJ2WCQRESWHHWL57BL32CKZXA5CNFSM6AAAAACKBQTVXSWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTWKHAH3I.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/6470/review/3392671668</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/6470#discussion_r2472501848",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6470#discussion_r2472501848",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>