Class: Bable::Index::ColemanLiau
- Defined in:
- lib/bable/index/coleman_liau.rb
Overview
This class is responsible of calculating the Coleman-Liau Index. Check en.wikipedia.org/wiki/Coleman%E2%80%93Liau_index for knowing more.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Bable::Index::Base
Instance Method Details
#calc ⇒ Object
6 7 8 9 |
# File 'lib/bable/index/coleman_liau.rb', line 6 def calc (0.0588 * average_chars_per_100_words - 0.296 * average_sentences_per_100_words - 15.8).round(2) end |