Method: English::Inflect.clear

Defined in:
lib/gems/english-0.3.1/lib/english/inflect.rb

.clear(type = :all) ⇒ Object

Clear all rules.



172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/gems/english-0.3.1/lib/english/inflect.rb', line 172

def clear(type = :all)
  if type == :singular || type == :all
    @singular_of = {}
    @singular_rules = []
    @singularization_rules, @singularization_regex = nil, nil
  end
  if type == :plural || type == :all
    @singular_of = {}
    @singular_rules = []
    @singularization_rules, @singularization_regex = nil, nil
  end
end