Ruby's Array#count has some superpowers
What do you do in Ruby when you need to get a count of elements in an array? You use methods like count, size or length. Ok, but do you know what’s the difference between those methods? I’m not talking about Rails and ActiveRecord and the different approaches each of these methods take to return a count. I’m talking about plain old Ruby.
Post a comment