jonatanklosko / wca_statistics

Build kit for generating cubing-related rankings
https://jonatanklosko.github.io/wca_statistics
MIT License
18 stars 29 forks source link

First attempt at collating dates list by month name #20

Closed OldManLink closed 1 year ago

OldManLink commented 1 year ago

OK, I really shouldn't stay up this late but I couldn't sleep without doing this. Plus, I know my ruby sucks, so I definitely won't mind any and all suggestions to improving the code. The result looks the way I think you wanted anyway:

DatesList

But now I'll be able to sleep, so I'll look at all your comments and improvements in the morning.

jonatanklosko commented 1 year ago

Thanks :)

OldManLink commented 1 year ago

Ah yes, that was much more beautiful, thanks! I'm really a Scala programmer, and your change made the code a lot more Scala-like 😁

I was a bit disturbed by the unused variables in your suggestion, so I googled a bit and found that ruby also has the same _ convention for marking block variables that are unused, so I took the liberty of making that change as well.

jonatanklosko commented 1 year ago

so I googled a bit and found that ruby also has the same _ convention for marking block variables that are unused, so I took the liberty of making that change as well

Totally, good call, I haven't written ruby for a while : )