Class: TextRank::CharFilter::Lowercase

Inherits:
Object
  • Object
show all
Defined in:
lib/text_rank/char_filter/lowercase.rb

Overview

Character filter to force text to lowercase

= Example

Lowercase.new.filter!("What a pessimist you are! - Candide") => "what a pessimist you are! - candide"

Instance Method Summary collapse

Instance Method Details

#filter!(text) ⇒ String

Perform the filter

Parameters:

  • text (String)

Returns:

  • (String)


16
17
18
# File 'lib/text_rank/char_filter/lowercase.rb', line 16

def filter!(text)
  text.downcase!
end