by mixmastamyk · 3y ago · 0 comments
As a native speaker of English, I’d just say, “if mylist’s length is more than 10”.
In Ruby I thus often write something such as:
if mylist.empty?.!
Because my line of thinking goes from the object to a function or attribute and then chains further along. Calling the `.!` method on the returned boolean object is very nice, because I don't have to go back to before mylist and insert the !-operator there.