You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text="This string has a date: Monday, November 3rd, 2011. I was thinking... it also shouldn't have too many contractions, maybe 4. <html> Some HTML and a hyphenated-word</html>. Don't count stray punctuation ? ? ? Please visit the ____________ ------------ ........ go-to site: https://www.example-site.com today. Let's add a list 1. item a 2. item b 3. item c. Now let's add he/she/it or a c:\\Users\\john. 2/15/2012 is the date! { HYPERLINK 'http://www.hello.com' }"WordCountAnalyzer::Analyzer.new.analyze(text)
from /home/devpolish/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/word_count_analyzer-1.0.1/lib/word_count_analyzer/analyzer.rb:4:in `initialize'
The text was updated successfully, but these errors were encountered:
This looks like a mistake in the documentation. If you take a look at the Analyzer#analyze source, it looks like you're supposed to pass the text into the Analyzer instance at initialization-time and then call .analyze.
irb(main):014:0> text="This string has a date: Monday, November 3rd, 2011. I was thinking... it also shouldn't have too many contractions, maybe 4. <html> Some HTML and a hyphenated-word</html>. Don't count stray punctuation ? ? ? Please visit the ____________ ------------ ........ go-to site: https://www.example-site.com today. Let's add a list 1. item a 2. item b 3. item c. Now let's add he/she/it or a c:\\Users\\john. 2/15/2012 is the date! { HYPERLINK 'http://www.hello.com' }"irb(main):015:0> WordCountAnalyzer::Analyzer.new(text: text).analyze=>{"ellipsis"=>1,"hyperlink"=>2,"contraction"=>4,"hyphenated_word"=>2,"date"=>2,"number"=>5,"numbered_list"=>4,"xhtml"=>1,"forward_slash"=>1,"backslash"=>1,"dotted_line"=>1,"dashed_line"=>1,"underscore"=>1,"stray_punctuation"=>5}
Rails: 5.1.7
Ruby: 2.5.2
from /home/devpolish/.rbenv/versions/2.5.2/lib/ruby/gems/2.5.0/gems/word_count_analyzer-1.0.1/lib/word_count_analyzer/analyzer.rb:4:in `initialize'
The text was updated successfully, but these errors were encountered: