A few thoughts, and I don't claim to be a "professional level" Ruby developer, but I do use it actively in my job.
https://github.com/LeamHall/bookbot/blob/master/lib/bookbot/section.rb#L42
It strikes me that this clause is a bit "wet" as the saying goes. If you could define a list of regex patterns in an Array, then iterate over the array with gsub in one line, you could avoid calling gsub so many times in sequence which to me, looks ugly.
https://github.com/LeamHall/bookbot/blob/master/lib/bookbot/section.rb#L135
Depending on what you're trying to do here, you might use an alias: How to Use The Ruby Alias Keyword - RubyGuides
Also, I would suggest finding an opensource project which strikes your fancy, and start picking up issues and bugs and making pull requests. You'll get peer reviewed and if it's a good project you'll get plenty of professional level feedback. One project I know is looking for help is Site Prism: GitHub - natritmeyer/site_prism: A Page Object Model DSL for Capybara or, if you are looking for something extra extra cool, not Ruby but very interesting: GitHub - LMMS/lmms: Cross-platform music production software . LMMS is C++ code, and Ruby is C++, so great opportunity there.
Good luck and thanks for spreading the Ruby 
On Sun, Jul 19, 2020 at 12:40 PM Martin DeMello <martindemello@gmail.com > <mailto:martindemello@gmail.com>> wrote:
For me the top thing is how in section.rb you have a bunch of
methods that communicate by creating and modifying instance
variables, and your code relies on calling them in the correct
order. I would write it more like
def initialize(file)
raw_text = slurp_file(file)
text = ascii_scrub(raw_text)
clean_array = report_scrub_string(text)
@word_count = clean_array.length
@sentence_count = count_sentences(text)
@syllable_count = count_syllables(clean_array)
end
martin
On Sun, Jul 19, 2020 at 8:20 AM Leam Hall <leamhall@gmail.com > <mailto:leamhall@gmail.com>> wrote:
Hey all,
I am trying to move my Ruby skills from "hobbyist" to
"professional".
Would you mind looking at some code and answering one question?
Code:
GitHub - LeamHall/bookbot: Builds books from data.
Question:
For professional level code, what are the top three things
this code needs?
Thank you.
Leam
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
<mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
<mailto:ruby-talk-request@ruby-lang.org>?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
--
A musician must make music, an artist must paint, a poet must write, if he is to be ultimately at peace with himself.
- Abraham Maslow
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>