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> 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?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>