This is a small program that receive a string and count the frequency of each word in the string.
The file "word_counter.rb" has the body of the method. The file "word_counter_test.rb" has the test of the method. And the "main.rb" is just a snippet code to prove the method using the Bash
Please before run the code, first call this on bash "$bundle install" in order to instal the necessary gems. This code use ruby 3.0.3
If you want to run the test just call $ruby word_counter_test.rb If you want just a try just call, for example, $ruby Hello Wordl!! or $ruby '["Hello", "World"]'