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