Method: String::Inflections.clear
- Defined in:
- lib/sequel/extensions/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
50 51 52 53 54 55 56 57 |
# File 'lib/sequel/extensions/inflector.rb', line 50 def self.clear(scope = :all) case scope when :all @plurals, @singulars, @uncountables = [], [], [] else instance_variable_set("@#{scope}", []) end end |