Class: Wikipedia::VandalismDetection::Features::InsertedSize
- Defined in:
- lib/wikipedia/vandalism_detection/features/inserted_size.rb
Overview
This feature computes the size of inserted text in the edit’s new revision.
Instance Method Summary collapse
-
#calculate(edit) ⇒ Object
Returns the size of inserted character in the new revision.
Methods inherited from Base
Instance Method Details
#calculate(edit) ⇒ Object
Returns the size of inserted character in the new revision.
11 12 13 14 15 16 |
# File 'lib/wikipedia/vandalism_detection/features/inserted_size.rb', line 11 def calculate(edit) super size = edit.inserted_text.size size >= 0 ? size : 0 end |