SyntaxFix
Write A Post
Hire A Developer
Questions
You could take any of the answers above that use the string.length method and replace it with string.size.
They both work the same way.
if string.size <= 25 puts "No problem here!" else puts "Sorry too long!" end
https://ruby-doc.org/core-2.4.0/String.html#method-i-size