Method: MotionSupport::Inflector::Inflections#clear
- Defined in:
- motion/inflector/inflections.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, :humans.
clear :all
clear :plurals
179 180 181 182 183 184 185 186 |
# File 'motion/inflector/inflections.rb', line 179 def clear(scope = :all) case scope when :all @plurals, @singulars, @uncountables, @humans = [], [], [], [] else instance_variable_set "@#{scope}", [] end end |