Method: String::Inflections.clear

Defined in:
lib/awestruct/util/inflector.rb

.clear(scope = :all) ⇒ Object

Clears the loaded inflections within a given scope (default is :all). Give the scope as a symbol of the inflection type, the options are: :plurals, :singulars, :uncountables

Examples:

clear :all
clear :plurals


42
43
44
45
46
47
48
49
# File 'lib/awestruct/util/inflector.rb', line 42

def self.clear(scope = :all)
  case scope
  when :all
    @plurals, @singulars, @uncountables = [], [], []
  else
    instance_variable_set("@#{scope}", [])
  end
end