TheRenegadeCoder / sample-programs

Sample Programs in Every Programming Language
https://sampleprograms.io
MIT License
553 stars 564 forks source link

Longest Word Method in Ruby #4030

Open arcjun01 opened 1 week ago

arcjun01 commented 1 week ago

Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder! For simplicity, please make sure that your pull request includes one and only one contribution.

Please fill one of the sections below as applicable. Please also add any other relevant information to the Notes section at the bottom. You may delete or just ignore any other sections. For more information please refer to our contributing documentation

I Am Adding a New Code Snippet in an Existing Language

Other Notes

This pull request adds a longest-word method, which calculates the length of the longest word in a given sentence. This method is a practice exercise for learning Ruby - focusing on string manipulation, array handling, and iteration.

Code Summary: