Class: Pedantic

Inherits:
Object
  • Object
show all
Includes:
Emoticons, Emphasis, Html, Punctuation, Stems, Txt, Unimportant, Uris
Defined in:
lib/pedantic.rb,
lib/pedantic.rb

Defined Under Namespace

Modules: Emoticons, Emphasis, Html, Punctuation, Stems, Txt, Unimportant, Uris

Constant Summary collapse

@@processors =
[]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Stems

included, #reduce_to_stems

Methods included from Unimportant

included, #remove_unimportant_words

Methods included from Emphasis

#fix_emphasis, included

Methods included from Punctuation

included, #replace_punctuation

Methods included from Txt

included, #replace_txt_words

Methods included from Emoticons

included, #replace_emoticons

Methods included from Html

included, #remove_html

Methods included from Uris

included, #remove_uris

Constructor Details

#initialize(string) ⇒ Pedantic

Returns a new instance of Pedantic.



12
13
14
# File 'lib/pedantic.rb', line 12

def initialize(string)
  @original = string
end

Class Method Details

.fix(string) ⇒ Object



4
5
6
# File 'lib/pedantic.rb', line 4

def self.fix(string)
  Pedantic.new(string).to_s
end

.processors(*methods) ⇒ Object



8
9
10
# File 'lib/pedantic.rb', line 8

def self.processors(*methods)
  @@processors += methods
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/pedantic.rb', line 16

def to_s
  process
end