Method: Treat::Workers::Inflectors::Declensors::English::Inflect.clear

Defined in:
lib/treat/workers/inflectors/declensors/english/inflect.rb

.clear(type = :all) ⇒ Object

Clear all rules.



174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/treat/workers/inflectors/declensors/english/inflect.rb', line 174

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