class Bable::Index::Base
Attributes
text[R]
Public Class Methods
new(text)
click to toggle source
# File lib/bable/index/base.rb, line 8 def initialize(text) @text = StatisticString.new(text) end
Public Instance Methods
calc()
click to toggle source
The calculation of the readability index. This method should be implemented in each index class (subclass of Base
). The returning value could potentially means different things, depending on the index. Read the documentation of each index for knowing more.
@return [Float] the resulting calculation of the index.
# File lib/bable/index/base.rb, line 18 def calc fail NotImplementedError end